1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-29 08:40:45 +02:00

fix types in index.d.ts

This commit is contained in:
Thomas Wilkerling
2025-05-10 15:19:19 +02:00
parent 07eeb037c3
commit 4575889d3f
2 changed files with 7 additions and 9 deletions

11
index.d.ts vendored
View File

@@ -1032,13 +1032,16 @@ declare module "flexsearch" {
resolve<e extends boolean = E>(options?: DefaultResolve<D, true, e>): DocumentSearchResultsWrapper<D, W, S, false, true, true, e>;
}
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<void>;
mount(index: Index | Document<D, W, StorageInterface>): Promise<void>;
open(): Promise<void>;
@@ -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

View File

@@ -1,5 +0,0 @@
{
"compilerOptions": {
"target": "ESNext"
}
}