1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-31 09:31:59 +02:00

- 修正DocumentOptions['index']类型推断。

This commit is contained in:
flycran
2025-05-09 12:10:37 +08:00
parent 8adb5215bf
commit 7027a11518

12
index.d.ts vendored
View File

@@ -419,14 +419,18 @@ declare module "flexsearch" {
db?: StorageInterface;
};
export type FieldOptions<D = DocumentData> = IndexOptions & DefaultFieldOptions<D> & {
config?: WorkerConfigURL | WorkerConfigPath;
};
export type TagOptions<D = DocumentData> = DefaultFieldOptions<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
*