Skip to content

Commit d1cc8f1

Browse files
Striftbrunoocasali
authored andcommitted
Revert type changes
1 parent dccd50f commit d1cc8f1

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

src/indexes.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -963,9 +963,7 @@ export class Index<T extends RecordAny = RecordAny> {
963963
* settings.
964964
* @returns Promise containing object of the enqueued update
965965
*/
966-
updateTypoTolerance(
967-
typoTolerance: Partial<TypoTolerance> | null,
968-
): EnqueuedTaskPromise {
966+
updateTypoTolerance(typoTolerance: TypoTolerance): EnqueuedTaskPromise {
969967
return this.#httpRequestsWithTask.patch({
970968
path: `indexes/${this.uid}/settings/typo-tolerance`,
971969
body: typoTolerance,

src/types/types.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,15 @@ export type RankingRules = string[] | null;
522522
export type StopWords = string[] | null;
523523
export type Synonyms = Record<string, string[]> | null;
524524
export type TypoTolerance = {
525-
enabled: boolean;
526-
disableOnAttributes: string[];
527-
disableOnNumbers: boolean;
528-
disableOnWords: string[];
529-
minWordSizeForTypos: {
530-
oneTypo: number;
531-
twoTypos: number;
525+
enabled?: boolean | null;
526+
disableOnAttributes?: string[] | null;
527+
disableOnNumbers?: boolean | null;
528+
disableOnWords?: string[] | null;
529+
minWordSizeForTypos?: {
530+
oneTypo?: number | null;
531+
twoTypos?: number | null;
532532
};
533-
};
533+
} | null;
534534
export type SeparatorTokens = string[] | null;
535535
export type NonSeparatorTokens = string[] | null;
536536
export type Dictionary = string[] | null;

0 commit comments

Comments
 (0)