1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-26 07:15:36 +02:00

export all by index.d.ts

This commit is contained in:
Thomas Wilkerling
2025-05-23 20:06:18 +02:00
parent 57a6f8cf1a
commit 1f75f5f9d9
2 changed files with 18 additions and 18 deletions

34
index.d.ts vendored
View File

@@ -15,11 +15,11 @@ declare module "flexsearch" {
/************************************/ /************************************/
/* Utils */ /* Utils */
/************************************/ /************************************/
type Id = number | string; export type Id = number | string;
type Limit = number; export type Limit = number;
type ExportHandler = (key: string, data: string) => void; export type ExportHandler = (key: string, data: string) => void;
type ExportHandlerAsync = (key: string, data: string) => Promise<void>; export type ExportHandlerAsync = (key: string, data: string) => Promise<void>;
type AsyncCallback<T> = (result?: T) => void; export type AsyncCallback<T> = (result?: T) => void;
/************************************/ /************************************/
/* Common Options */ /* Common Options */
@@ -29,7 +29,7 @@ declare module "flexsearch" {
* **Document:** * **Document:**
* * Presets: https://github.com/nextapps-de/flexsearch#presets * * Presets: https://github.com/nextapps-de/flexsearch#presets
*/ */
type Preset = export type Preset =
| "memory" | "memory"
| "performance" | "performance"
| "match" | "match"
@@ -40,7 +40,7 @@ declare module "flexsearch" {
* Tokenizer: https://github.com/nextapps-de/flexsearch#tokenizer-prefix-search \ * Tokenizer: https://github.com/nextapps-de/flexsearch#tokenizer-prefix-search \
* Custom Tokenizer: https://github.com/nextapps-de/flexsearch#add-custom-tokenizer * Custom Tokenizer: https://github.com/nextapps-de/flexsearch#add-custom-tokenizer
*/ */
type Tokenizer = export type Tokenizer =
| "strict" | "exact" | "default" | "strict" | "exact" | "default"
| "tolerant" | "tolerant"
| "forward" | "forward"
@@ -50,7 +50,7 @@ declare module "flexsearch" {
/** /**
* Encoders: https://github.com/nextapps-de/flexsearch#encoders * Encoders: https://github.com/nextapps-de/flexsearch#encoders
*/ */
type Encoders = export type Encoders =
| "Exact" | "Exact"
| "Default" | "Default"
| "Normalize" | "Normalize"
@@ -73,7 +73,7 @@ declare module "flexsearch" {
* * Contextual search: https://github.com/nextapps-de/flexsearch#contextual * * Contextual search: https://github.com/nextapps-de/flexsearch#contextual
*/ */
type ContextOptions = { export type ContextOptions = {
resolution: number; resolution: number;
depth: number; depth: number;
bidirectional: boolean; bidirectional: boolean;
@@ -94,7 +94,7 @@ declare module "flexsearch" {
resolve?: R; resolve?: R;
}; };
type SerializedFunctionString = string; export type SerializedFunctionString = string;
/** /**
* **Document:** * **Document:**
@@ -375,11 +375,11 @@ declare module "flexsearch" {
/* Worker Index */ /* Worker Index */
/************************************/ /************************************/
type WorkerURL = string; export type WorkerURL = string;
type WorkerPath = string; export type WorkerPath = string;
type WorkerConfigURL = string; export type WorkerConfigURL = string;
type WorkerConfigPath = string; export type WorkerConfigPath = string;
type WorkerType = boolean | WorkerURL | WorkerPath; export type WorkerType = boolean | WorkerURL | WorkerPath;
export type WorkerIndexOptions = IndexOptions & IndexWorkerConfig<true> & { export type WorkerIndexOptions = IndexOptions & IndexWorkerConfig<true> & {
//config?: WorkerConfigURL | WorkerConfigPath, //config?: WorkerConfigURL | WorkerConfigPath,
@@ -408,7 +408,7 @@ declare module "flexsearch" {
/* Document Search */ /* Document Search */
/************************************/ /************************************/
type CustomFN<D = DocumentData> = (doc: D) => string | boolean; export type CustomFN<D = DocumentData> = (doc: D) => string | boolean;
/** /**
* The template to be applied on matches (e.g. <code>"\<b>$1\</b>"</code>), where <code>\$1</code> is a placeholder for the matched partial * The template to be applied on matches (e.g. <code>"\<b>$1\</b>"</code>), where <code>\$1</code> is a placeholder for the matched partial
@@ -918,7 +918,7 @@ declare module "flexsearch" {
): DocumentSearchResultsWrapper<D, W, S, H, P, R, E, M, true>; ): DocumentSearchResultsWrapper<D, W, S, H, P, R, E, M, true>;
} }
type IdType = export type IdType =
"text" | "text" |
"char" | "char" |
"varchar" | "varchar" |

View File

@@ -2,7 +2,7 @@
"public": true, "public": true,
"preferGlobal": false, "preferGlobal": false,
"name": "flexsearch", "name": "flexsearch",
"version": "0.8.203", "version": "0.8.204",
"description": "Next-Generation full-text search library for Browser and Node.js", "description": "Next-Generation full-text search library for Browser and Node.js",
"homepage": "https://github.com/nextapps-de/flexsearch/", "homepage": "https://github.com/nextapps-de/flexsearch/",
"author": "Thomas Wilkerling", "author": "Thomas Wilkerling",