From cd73be0c6d41d290b0c935fd6acd2ef4d694d038 Mon Sep 17 00:00:00 2001 From: Simon Walenkamp Hansen Date: Thu, 5 Dec 2024 11:52:49 +0100 Subject: [PATCH] Review comments --- .../src/builders/search/contentHighlightingBuilder.ts | 10 +++++----- .../src/builders/search/productHighlightingBuilder.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/client/src/builders/search/contentHighlightingBuilder.ts b/packages/client/src/builders/search/contentHighlightingBuilder.ts index 5c42790..0dc468b 100644 --- a/packages/client/src/builders/search/contentHighlightingBuilder.ts +++ b/packages/client/src/builders/search/contentHighlightingBuilder.ts @@ -1,7 +1,7 @@ import { ContentHighlightProps, ContentSearchSettingsHighlightSettings, HighlightSettings2ContentContentHighlightPropsHighlightSettings2Limits, HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape } from '../../models/data-contracts'; export class ContentHighlightingBuilder { - private enabled: boolean = true; + private enabledState: boolean = true; private highlightable: ContentHighlightProps = { $type: 'Relewise.Client.Requests.Shared.Highlighting.ContentHighlightProps, Relewise.Client', displayName: false @@ -11,8 +11,8 @@ export class ContentHighlightingBuilder { includeOffsets: false }; - public enable(enabled: boolean): this { - this.enabled = enabled; + public enabled(enabled: boolean): this { + this.enabledState = enabled; return this; } @@ -41,10 +41,10 @@ export class ContentHighlightingBuilder { public build(): ContentSearchSettingsHighlightSettings { return { $type: 'Relewise.Client.Requests.Search.Settings.ContentSearchSettings+HighlightSettings, Relewise.Client', - enabled: this.enabled, + enabled: this.enabledState, highlightable: this.highlightable, limit: this.limit, shape: this.shape - } as ContentSearchSettingsHighlightSettings; + }; } } \ No newline at end of file diff --git a/packages/client/src/builders/search/productHighlightingBuilder.ts b/packages/client/src/builders/search/productHighlightingBuilder.ts index d3dc26b..e8ee7f5 100644 --- a/packages/client/src/builders/search/productHighlightingBuilder.ts +++ b/packages/client/src/builders/search/productHighlightingBuilder.ts @@ -1,7 +1,7 @@ import { HighlightSettings2ProductProductHighlightPropsHighlightSettings2Limits, HighlightSettings2ProductProductHighlightPropsHighlightSettings2ResponseShape, ProductHighlightProps, ProductSearchSettingsHighlightSettings } from '../../models/data-contracts'; export class ProductHighlightingBuilder { - private enabled: boolean = true; + private enabledState: boolean = true; private highlightable: ProductHighlightProps = { $type: 'Relewise.Client.Requests.Shared.Highlighting.ProductHighlightProps, Relewise.Client', displayName: false @@ -11,8 +11,8 @@ export class ProductHighlightingBuilder { includeOffsets: false }; - public enable(enabled: boolean): this { - this.enabled = enabled; + public enabled(enabled: boolean): this { + this.enabledState = enabled; return this; } @@ -41,10 +41,10 @@ export class ProductHighlightingBuilder { public build(): ProductSearchSettingsHighlightSettings { return { $type: 'Relewise.Client.Requests.Search.Settings.ProductSearchSettings+HighlightSettings, Relewise.Client', - enabled: this.enabled, + enabled: this.enabledState, highlightable: this.highlightable, limit: this.limit, shape: this.shape - } as ProductSearchSettingsHighlightSettings; + }; } } \ No newline at end of file