Skip to content

Commit cd73be0

Browse files
committed
Review comments
1 parent f54fd3c commit cd73be0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

packages/client/src/builders/search/contentHighlightingBuilder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ContentHighlightProps, ContentSearchSettingsHighlightSettings, HighlightSettings2ContentContentHighlightPropsHighlightSettings2Limits, HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape } from '../../models/data-contracts';
22

33
export class ContentHighlightingBuilder {
4-
private enabled: boolean = true;
4+
private enabledState: boolean = true;
55
private highlightable: ContentHighlightProps = {
66
$type: 'Relewise.Client.Requests.Shared.Highlighting.ContentHighlightProps, Relewise.Client',
77
displayName: false
@@ -11,8 +11,8 @@ export class ContentHighlightingBuilder {
1111
includeOffsets: false
1212
};
1313

14-
public enable(enabled: boolean): this {
15-
this.enabled = enabled;
14+
public enabled(enabled: boolean): this {
15+
this.enabledState = enabled;
1616

1717
return this;
1818
}
@@ -41,10 +41,10 @@ export class ContentHighlightingBuilder {
4141
public build(): ContentSearchSettingsHighlightSettings {
4242
return {
4343
$type: 'Relewise.Client.Requests.Search.Settings.ContentSearchSettings+HighlightSettings, Relewise.Client',
44-
enabled: this.enabled,
44+
enabled: this.enabledState,
4545
highlightable: this.highlightable,
4646
limit: this.limit,
4747
shape: this.shape
48-
} as ContentSearchSettingsHighlightSettings;
48+
};
4949
}
5050
}

packages/client/src/builders/search/productHighlightingBuilder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HighlightSettings2ProductProductHighlightPropsHighlightSettings2Limits, HighlightSettings2ProductProductHighlightPropsHighlightSettings2ResponseShape, ProductHighlightProps, ProductSearchSettingsHighlightSettings } from '../../models/data-contracts';
22

33
export class ProductHighlightingBuilder {
4-
private enabled: boolean = true;
4+
private enabledState: boolean = true;
55
private highlightable: ProductHighlightProps = {
66
$type: 'Relewise.Client.Requests.Shared.Highlighting.ProductHighlightProps, Relewise.Client',
77
displayName: false
@@ -11,8 +11,8 @@ export class ProductHighlightingBuilder {
1111
includeOffsets: false
1212
};
1313

14-
public enable(enabled: boolean): this {
15-
this.enabled = enabled;
14+
public enabled(enabled: boolean): this {
15+
this.enabledState = enabled;
1616

1717
return this;
1818
}
@@ -41,10 +41,10 @@ export class ProductHighlightingBuilder {
4141
public build(): ProductSearchSettingsHighlightSettings {
4242
return {
4343
$type: 'Relewise.Client.Requests.Search.Settings.ProductSearchSettings+HighlightSettings, Relewise.Client',
44-
enabled: this.enabled,
44+
enabled: this.enabledState,
4545
highlightable: this.highlightable,
4646
limit: this.limit,
4747
shape: this.shape
48-
} as ProductSearchSettingsHighlightSettings;
48+
};
4949
}
5050
}

0 commit comments

Comments
 (0)