From 4ab707ef5684c3e27aea8265a79636ccbc72455c Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Tue, 6 May 2025 11:42:58 +0200 Subject: [PATCH] proper encoder type in index.d.ts --- index.d.ts | 58 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/index.d.ts b/index.d.ts index 0697b45..8cb1340 100644 --- a/index.d.ts +++ b/index.d.ts @@ -193,7 +193,7 @@ declare module "flexsearch" { commit?: boolean; // Language-specific Options and Encoding - encoder?: typeof Charset | Encoders | EncoderOptions | Encoder; + encoder?: Encoders | EncoderOptions | Encoder; encode?: (text: string) => string[], rtl?: boolean; }; @@ -504,6 +504,34 @@ declare module "flexsearch" { ): Promise; } + 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 = { query?: string; 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/*" { export default StorageInterface; }