From 47a6f62ceea1b2b2cca44ab05fbd95dcfa2d9707 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Tue, 6 May 2025 11:08:18 +0200 Subject: [PATCH] simplify module declaration within index.d.ts --- index.d.ts | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/index.d.ts b/index.d.ts index 0bc588c..30b8f48 100644 --- a/index.d.ts +++ b/index.d.ts @@ -630,23 +630,7 @@ type PersistentOptions = { db?: any; }; -declare module "flexsearch/db/redis" { - export default StorageInterface; -} - -declare module "flexsearch/db/postgres" { - export default StorageInterface; -} - -declare module "flexsearch/db/mongodb" { - export default StorageInterface; -} - -declare module "flexsearch/db/sqlite" { - export default StorageInterface; -} - -declare module "flexsearch/db/clickhouse" { +declare module "flexsearch/db/*" { export default StorageInterface; } @@ -658,16 +642,9 @@ declare module "flexsearch/db/indexeddb" { // ----------------------------------- -declare module "flexsearch/lang/en" { - export default EncoderOptions; -} - -declare module "flexsearch/lang/de" { - export default EncoderOptions; -} - -declare module "flexsearch/lang/fr" { - export default EncoderOptions; +declare module "flexsearch/lang/*" { + const Options: EncoderOptions; + export default Options; } // https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html