mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-27 07:44:35 +02:00
proper encoder type in index.d.ts
This commit is contained in:
58
index.d.ts
vendored
58
index.d.ts
vendored
@@ -193,7 +193,7 @@ declare module "flexsearch" {
|
|||||||
commit?: boolean;
|
commit?: boolean;
|
||||||
|
|
||||||
// Language-specific Options and Encoding
|
// Language-specific Options and Encoding
|
||||||
encoder?: typeof Charset | Encoders | EncoderOptions | Encoder;
|
encoder?: Encoders | EncoderOptions | Encoder;
|
||||||
encode?: (text: string) => string[],
|
encode?: (text: string) => string[],
|
||||||
rtl?: boolean;
|
rtl?: boolean;
|
||||||
};
|
};
|
||||||
@@ -504,6 +504,34 @@ declare module "flexsearch" {
|
|||||||
): Promise<DocumentSearchResults>;
|
): Promise<DocumentSearchResults>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IdType =
|
||||||
|
"text" |
|
||||||
|
"char" |
|
||||||
|
"varchar" |
|
||||||
|
"string" |
|
||||||
|
"number" |
|
||||||
|
"numeric" |
|
||||||
|
"integer" |
|
||||||
|
"smallint" |
|
||||||
|
"tinyint" |
|
||||||
|
"mediumint" |
|
||||||
|
"int" |
|
||||||
|
"int8" |
|
||||||
|
"uint8" |
|
||||||
|
"int16" |
|
||||||
|
"uint16" |
|
||||||
|
"int32" |
|
||||||
|
"uint32" |
|
||||||
|
"int64" |
|
||||||
|
"uint64" |
|
||||||
|
"bigint";
|
||||||
|
|
||||||
|
type PersistentOptions = {
|
||||||
|
name?: string;
|
||||||
|
type?: IdType;
|
||||||
|
db?: any;
|
||||||
|
};
|
||||||
|
|
||||||
type DefaultResolve = {
|
type DefaultResolve = {
|
||||||
query?: string;
|
query?: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
@@ -602,34 +630,6 @@ declare module "flexsearch" {
|
|||||||
|
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
|
|
||||||
type IdType =
|
|
||||||
"text" |
|
|
||||||
"char" |
|
|
||||||
"varchar" |
|
|
||||||
"string" |
|
|
||||||
"number" |
|
|
||||||
"numeric" |
|
|
||||||
"integer" |
|
|
||||||
"smallint" |
|
|
||||||
"tinyint" |
|
|
||||||
"mediumint" |
|
|
||||||
"int" |
|
|
||||||
"int8" |
|
|
||||||
"uint8" |
|
|
||||||
"int16" |
|
|
||||||
"uint16" |
|
|
||||||
"int32" |
|
|
||||||
"uint32" |
|
|
||||||
"int64" |
|
|
||||||
"uint64" |
|
|
||||||
"bigint";
|
|
||||||
|
|
||||||
type PersistentOptions = {
|
|
||||||
name?: string;
|
|
||||||
type?: IdType;
|
|
||||||
db?: any;
|
|
||||||
};
|
|
||||||
|
|
||||||
declare module "flexsearch/db/*" {
|
declare module "flexsearch/db/*" {
|
||||||
export default StorageInterface;
|
export default StorageInterface;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user