1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-29 08:40:45 +02:00

Revert "- 更新index.d.ts"

This reverts commit 15a9ff334a.
This commit is contained in:
flycran
2025-05-05 10:55:04 +08:00
parent 15a9ff334a
commit babbe1d73c

24
index.d.ts vendored
View File

@@ -217,9 +217,9 @@ declare module "flexsearch" {
/* Index Search */ /* Index Search */
/************************************/ /************************************/
export type DefaultSearchResults = Id[]; type DefaultSearchResults = Id[];
type IntermediateSearchResults = Array<Id[]>; type IntermediateSearchResults = Array<Id[]>;
type SearchResults<D extends DocumentData = DocumentData> = DefaultSearchResults | Resolver<D>; type SearchResults = DefaultSearchResults | Resolver;
/** /**
* **Document:** * **Document:**
@@ -606,14 +606,14 @@ declare module "flexsearch" {
enrich?: boolean; enrich?: boolean;
}; };
type ResolverOptions<D extends DocumentData = DocumentData> = DefaultResolve & { type ResolverOptions = DefaultResolve & {
index?: Index | Document<D>; index?: Index | Document;
pluck?: FieldName<D>; pluck?: FieldName;
field?: FieldName<D>; field?: FieldName;
and?: ResolverOptions<D> | Array<ResolverOptions<D>>; and?: ResolverOptions | Array<ResolverOptions>;
or?: ResolverOptions<D> | Array<ResolverOptions<D>>; or?: ResolverOptions | Array<ResolverOptions>;
xor?: ResolverOptions<D> | Array<ResolverOptions<D>>; xor?: ResolverOptions | Array<ResolverOptions>;
not?: ResolverOptions<D> | Array<ResolverOptions<D>>; not?: ResolverOptions | Array<ResolverOptions>;
boost?: number; boost?: number;
suggest?: boolean; suggest?: boolean;
resolve?: boolean; resolve?: boolean;
@@ -660,7 +660,7 @@ declare module "flexsearch" {
addReplacer(match: string | RegExp, replace: string): this; addReplacer(match: string | RegExp, replace: string): this;
} }
export class Resolver<D extends DocumentData = DocumentData> { export class Resolver {
result: IntermediateSearchResults; result: IntermediateSearchResults;
constructor(options?: ResolverOptions | IntermediateSearchResults); constructor(options?: ResolverOptions | IntermediateSearchResults);
@@ -679,7 +679,7 @@ declare module "flexsearch" {
boost(boost: number): this; boost(boost: number): this;
resolve(options?: DefaultResolve): SearchResults<D>; resolve(options?: DefaultResolve): SearchResults;
} }
class StorageInterface { class StorageInterface {