1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-27 15:50:44 +02:00

proper encoder type in index.d.ts

This commit is contained in:
Thomas Wilkerling
2025-05-06 11:42:58 +02:00
parent 5d7de9dd11
commit 4ab707ef56

58
index.d.ts vendored
View File

@@ -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;
} }