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

add globals within index.d.ts

This commit is contained in:
Thomas Wilkerling
2025-05-06 11:49:45 +02:00
parent c25b91d5a5
commit c7cbaca5a0

6
index.d.ts vendored
View File

@@ -124,6 +124,7 @@ declare module "flexsearch" {
* * Language: https://github.com/nextapps-de/flexsearch#languages * * Language: https://github.com/nextapps-de/flexsearch#languages
*/ */
global {
type EncoderOptions = { type EncoderOptions = {
rtl?: boolean; rtl?: boolean;
dedupe?: boolean; dedupe?: boolean;
@@ -142,7 +143,7 @@ declare module "flexsearch" {
minlength?: number; minlength?: number;
maxlength?: number; maxlength?: number;
cache?: boolean | number; cache?: boolean | number;
}; }}
type EncoderSplitOptions = { type EncoderSplitOptions = {
letter?: boolean; letter?: boolean;
@@ -710,6 +711,7 @@ declare module "flexsearch" {
resolve(options?: DefaultResolve): SearchResults; resolve(options?: DefaultResolve): SearchResults;
} }
global {
export class StorageInterface { export class StorageInterface {
db: any; db: any;
@@ -726,7 +728,7 @@ declare module "flexsearch" {
destroy(): Promise<void>; destroy(): Promise<void>;
clear(): Promise<void>; clear(): Promise<void>;
} }}
export class IndexedDB extends StorageInterface { export class IndexedDB extends StorageInterface {
db: IDBDatabase; db: IDBDatabase;