mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-09-03 10:53:41 +02:00
- 修正DocumentOptions['index']
类型推断。
This commit is contained in:
12
index.d.ts
vendored
12
index.d.ts
vendored
@@ -419,14 +419,18 @@ declare module "flexsearch" {
|
|||||||
db?: StorageInterface;
|
db?: StorageInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type FieldOptions<D = DocumentData> = IndexOptions & DefaultFieldOptions<D> & {
|
|
||||||
config?: WorkerConfigURL | WorkerConfigPath;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TagOptions<D = DocumentData> = DefaultFieldOptions<D>;
|
export type TagOptions<D = DocumentData> = DefaultFieldOptions<D>;
|
||||||
|
|
||||||
export type StoreOptions<D = DocumentData> = DefaultFieldOptions<D> | DefaultCustomFieldOptions<D>;
|
export type StoreOptions<D = DocumentData> = DefaultFieldOptions<D> | DefaultCustomFieldOptions<D>;
|
||||||
|
|
||||||
|
export interface IndexWorkerConfig {
|
||||||
|
config?: WorkerConfigURL | WorkerConfigPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type FieldOptions<D extends DocumentData> =
|
||||||
|
(DefaultFieldOptions<D> & IndexWorkerConfig)
|
||||||
|
| (DefaultCustomFieldOptions<D> & IndexWorkerConfig)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* # Document Search Result
|
* # Document Search Result
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user