From 1f75f5f9d9b6f0cc337c0033e0b4ee3a7f63c29f Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Fri, 23 May 2025 20:06:18 +0200 Subject: [PATCH] export all by index.d.ts --- index.d.ts | 34 +++++++++++++++++----------------- package.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/index.d.ts b/index.d.ts index bf3b3fa..a3d76bd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -15,11 +15,11 @@ declare module "flexsearch" { /************************************/ /* Utils */ /************************************/ - type Id = number | string; - type Limit = number; - type ExportHandler = (key: string, data: string) => void; - type ExportHandlerAsync = (key: string, data: string) => Promise; - type AsyncCallback = (result?: T) => void; + export type Id = number | string; + export type Limit = number; + export type ExportHandler = (key: string, data: string) => void; + export type ExportHandlerAsync = (key: string, data: string) => Promise; + export type AsyncCallback = (result?: T) => void; /************************************/ /* Common Options */ @@ -29,7 +29,7 @@ declare module "flexsearch" { * **Document:** * * Presets: https://github.com/nextapps-de/flexsearch#presets */ - type Preset = + export type Preset = | "memory" | "performance" | "match" @@ -40,7 +40,7 @@ declare module "flexsearch" { * Tokenizer: https://github.com/nextapps-de/flexsearch#tokenizer-prefix-search \ * Custom Tokenizer: https://github.com/nextapps-de/flexsearch#add-custom-tokenizer */ - type Tokenizer = + export type Tokenizer = | "strict" | "exact" | "default" | "tolerant" | "forward" @@ -50,7 +50,7 @@ declare module "flexsearch" { /** * Encoders: https://github.com/nextapps-de/flexsearch#encoders */ - type Encoders = + export type Encoders = | "Exact" | "Default" | "Normalize" @@ -73,7 +73,7 @@ declare module "flexsearch" { * * Contextual search: https://github.com/nextapps-de/flexsearch#contextual */ - type ContextOptions = { + export type ContextOptions = { resolution: number; depth: number; bidirectional: boolean; @@ -94,7 +94,7 @@ declare module "flexsearch" { resolve?: R; }; - type SerializedFunctionString = string; + export type SerializedFunctionString = string; /** * **Document:** @@ -375,11 +375,11 @@ declare module "flexsearch" { /* Worker Index */ /************************************/ - type WorkerURL = string; - type WorkerPath = string; - type WorkerConfigURL = string; - type WorkerConfigPath = string; - type WorkerType = boolean | WorkerURL | WorkerPath; + export type WorkerURL = string; + export type WorkerPath = string; + export type WorkerConfigURL = string; + export type WorkerConfigPath = string; + export type WorkerType = boolean | WorkerURL | WorkerPath; export type WorkerIndexOptions = IndexOptions & IndexWorkerConfig & { //config?: WorkerConfigURL | WorkerConfigPath, @@ -408,7 +408,7 @@ declare module "flexsearch" { /* Document Search */ /************************************/ - type CustomFN = (doc: D) => string | boolean; + export type CustomFN = (doc: D) => string | boolean; /** * The template to be applied on matches (e.g. "\$1\"), where \$1 is a placeholder for the matched partial @@ -918,7 +918,7 @@ declare module "flexsearch" { ): DocumentSearchResultsWrapper; } - type IdType = + export type IdType = "text" | "char" | "varchar" | diff --git a/package.json b/package.json index 2935304..0674893 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "public": true, "preferGlobal": false, "name": "flexsearch", - "version": "0.8.203", + "version": "0.8.204", "description": "Next-Generation full-text search library for Browser and Node.js", "homepage": "https://github.com/nextapps-de/flexsearch/", "author": "Thomas Wilkerling",