From babbe1d73c5bec6d1899d9d0d92450565eea8d88 Mon Sep 17 00:00:00 2001 From: flycran Date: Mon, 5 May 2025 10:55:04 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"-=20=E6=9B=B4=E6=96=B0index.d.ts"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 15a9ff334a5efd1a2bdfaba2d8fb159793baf950. --- index.d.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/index.d.ts b/index.d.ts index f4ba065..1a61e90 100644 --- a/index.d.ts +++ b/index.d.ts @@ -217,9 +217,9 @@ declare module "flexsearch" { /* Index Search */ /************************************/ - export type DefaultSearchResults = Id[]; + type DefaultSearchResults = Id[]; type IntermediateSearchResults = Array; - type SearchResults = DefaultSearchResults | Resolver; + type SearchResults = DefaultSearchResults | Resolver; /** * **Document:** @@ -606,14 +606,14 @@ declare module "flexsearch" { enrich?: boolean; }; - type ResolverOptions = DefaultResolve & { - index?: Index | Document; - pluck?: FieldName; - field?: FieldName; - and?: ResolverOptions | Array>; - or?: ResolverOptions | Array>; - xor?: ResolverOptions | Array>; - not?: ResolverOptions | Array>; + type ResolverOptions = DefaultResolve & { + index?: Index | Document; + pluck?: FieldName; + field?: FieldName; + and?: ResolverOptions | Array; + or?: ResolverOptions | Array; + xor?: ResolverOptions | Array; + not?: ResolverOptions | Array; boost?: number; suggest?: boolean; resolve?: boolean; @@ -660,7 +660,7 @@ declare module "flexsearch" { addReplacer(match: string | RegExp, replace: string): this; } - export class Resolver { + export class Resolver { result: IntermediateSearchResults; constructor(options?: ResolverOptions | IntermediateSearchResults); @@ -679,7 +679,7 @@ declare module "flexsearch" { boost(boost: number): this; - resolve(options?: DefaultResolve): SearchResults; + resolve(options?: DefaultResolve): SearchResults; } class StorageInterface {