mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-30 17:20:17 +02:00
remove unused exports from index.d.ts
This commit is contained in:
38
index.d.ts
vendored
38
index.d.ts
vendored
@@ -30,9 +30,8 @@ declare module "flexsearch" {
|
|||||||
| "default";
|
| "default";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* **Document:**
|
* Tokenizer: https://github.com/nextapps-de/flexsearch#tokenizer-prefix-search \
|
||||||
* * Tokenizer: https://github.com/nextapps-de/flexsearch#tokenizer-prefix-search
|
* Custom Tokenizer: https://github.com/nextapps-de/flexsearch#add-custom-tokenizer
|
||||||
* * Add custom tokenizer: https://github.com/nextapps-de/flexsearch#add-custom-tokenizer
|
|
||||||
*/
|
*/
|
||||||
type Tokenizer =
|
type Tokenizer =
|
||||||
| "strict" | "exact" | "default"
|
| "strict" | "exact" | "default"
|
||||||
@@ -41,8 +40,7 @@ declare module "flexsearch" {
|
|||||||
| "full";
|
| "full";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* **Document:**
|
* Encoders: https://github.com/nextapps-de/flexsearch#encoders
|
||||||
* * Encoders: https://github.com/nextapps-de/flexsearch#encoders
|
|
||||||
*/
|
*/
|
||||||
type Encoders =
|
type Encoders =
|
||||||
| "Exact"
|
| "Exact"
|
||||||
@@ -77,7 +75,7 @@ declare module "flexsearch" {
|
|||||||
* **Document:**
|
* **Document:**
|
||||||
* * Search options: https://github.com/nextapps-de/flexsearch#search-options
|
* * Search options: https://github.com/nextapps-de/flexsearch#search-options
|
||||||
*/
|
*/
|
||||||
export type SearchOptions<R extends boolean = false> = {
|
type SearchOptions<R extends boolean = false> = {
|
||||||
query?: string;
|
query?: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
@@ -217,8 +215,8 @@ declare module "flexsearch" {
|
|||||||
export?: () => Promise<void>;
|
export?: () => Promise<void>;
|
||||||
import?: () => Promise<void>;
|
import?: () => Promise<void>;
|
||||||
// no persistent supported
|
// no persistent supported
|
||||||
db: null;
|
db?: null;
|
||||||
commit: null;
|
commit?: null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/************************************/
|
/************************************/
|
||||||
@@ -386,21 +384,23 @@ declare module "flexsearch" {
|
|||||||
|
|
||||||
type WorkerType = boolean | WorkerURL | WorkerPath
|
type WorkerType = boolean | WorkerURL | WorkerPath
|
||||||
|
|
||||||
type DocumentOptions<D extends DocumentData = DocumentData, W extends WorkerType = false, B extends StorageInterface = undefined> =
|
type DocumentOptions<
|
||||||
IndexOptions<B>
|
D extends DocumentData = DocumentData,
|
||||||
& {
|
W extends WorkerType = false,
|
||||||
|
B extends StorageInterface = undefined
|
||||||
|
> = IndexOptions<B> & {
|
||||||
worker?: W;
|
worker?: W;
|
||||||
doc?: DocumentDescriptor<D>;
|
doc?: DocumentDescriptor<D>;
|
||||||
document?: DocumentDescriptor<D>;
|
document?: DocumentDescriptor<D>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DefaultDocumentSearchResults<D extends DocumentData = DocumentData> = Array<{
|
type DefaultDocumentSearchResults<D extends DocumentData = DocumentData> = Array<{
|
||||||
field?: FieldName<D>;
|
field?: FieldName<D>;
|
||||||
tag?: FieldName<D>;
|
tag?: FieldName<D>;
|
||||||
result: DefaultSearchResults;
|
result: DefaultSearchResults;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export type EnrichedDocumentSearchResults<D extends DocumentData = DocumentData> = Array<{
|
type EnrichedDocumentSearchResults<D extends DocumentData = DocumentData> = Array<{
|
||||||
field?: FieldName<D>;
|
field?: FieldName<D>;
|
||||||
tag?: FieldName<D>;
|
tag?: FieldName<D>;
|
||||||
result: Array<{
|
result: Array<{
|
||||||
@@ -410,15 +410,19 @@ declare module "flexsearch" {
|
|||||||
}>;
|
}>;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export type MergedDocumentSearchResults<D extends DocumentData = DocumentData> = Array<{
|
type MergedDocumentSearchResults<D extends DocumentData = DocumentData> = Array<{
|
||||||
id: Id;
|
id: Id;
|
||||||
doc: D | null;
|
doc: D | null;
|
||||||
field?: FieldName[];
|
field?: FieldName[];
|
||||||
tag?: FieldName[];
|
tag?: FieldName[];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
type DocumentSearchResults<D extends DocumentData = DocumentData, R extends boolean = false, E extends boolean = false, M extends boolean = false> =
|
type DocumentSearchResults<
|
||||||
R extends true
|
D extends DocumentData = DocumentData,
|
||||||
|
R extends boolean = false,
|
||||||
|
E extends boolean = false,
|
||||||
|
M extends boolean = false
|
||||||
|
> = R extends true
|
||||||
? Resolver
|
? Resolver
|
||||||
: M extends true
|
: M extends true
|
||||||
? MergedDocumentSearchResults<D>
|
? MergedDocumentSearchResults<D>
|
||||||
@@ -733,7 +737,7 @@ declare module "flexsearch" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
global {
|
global {
|
||||||
export class StorageInterface {
|
class StorageInterface {
|
||||||
db: any;
|
db: any;
|
||||||
|
|
||||||
constructor(name: string, config: PersistentOptions);
|
constructor(name: string, config: PersistentOptions);
|
||||||
|
Reference in New Issue
Block a user