From 4575889d3f27fd16eca5c79cafa2dbff7fef2264 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Sat, 10 May 2025 15:19:19 +0200 Subject: [PATCH] fix types in index.d.ts --- index.d.ts | 11 +++++++---- tsconfig.json | 5 ----- 2 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 tsconfig.json diff --git a/index.d.ts b/index.d.ts index 3ef6274..931776d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1032,13 +1032,16 @@ declare module "flexsearch" { resolve(options?: DefaultResolve): DocumentSearchResultsWrapper; } - export class StorageInterface { + export class StorageInterface< + D extends DocumentData = DocumentData, + W extends WorkerType = false + > { db: any; constructor(name: string, config: PersistentOptions); constructor(config: string | PersistentOptions); - mount(index: Index | Document): Promise; + mount(index: Index | Document): Promise; open(): Promise; @@ -1084,8 +1087,8 @@ declare module "flexsearch/db/*" { declare module "flexsearch/lang/*" { import { EncoderOptions } from "flexsearch"; - //const Options: EncoderOptions; - export default EncoderOptions; + const Options: EncoderOptions; + export default Options; } // https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 678ff85..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext" - } -}