1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-28 16:20:04 +02:00

minor optimization of index.d.ts

This commit is contained in:
Thomas Wilkerling
2025-05-07 12:00:37 +02:00
parent 5ebe58065c
commit 2d53d5e556
2 changed files with 9 additions and 8 deletions

View File

@@ -264,7 +264,7 @@ Extern Projects & Plugins:
- [Latin Charset Encoder Presets](doc/encoder.md) - [Latin Charset Encoder Presets](doc/encoder.md)
- [Language Specific Preset](doc/encoder.md) - [Language Specific Preset](doc/encoder.md)
- [Custom Encoder](doc/encoder.md#custom-encoder) - [Custom Encoder](doc/encoder.md#custom-encoder)
- [Non-Blocking Runtime Balancer (Async)](doc/async.md) - [Async Non-Blocking Runtime Balancer](doc/async.md)
- [Worker Indexes](doc/worker.md) - [Worker Indexes](doc/worker.md)
- [Worker Index Options](doc/worker.md#worker-index-options) - [Worker Index Options](doc/worker.md#worker-index-options)
- [Resolver (Complex Queries)](doc/resolver.md) - [Resolver (Complex Queries)](doc/resolver.md)
@@ -286,10 +286,10 @@ Extern Projects & Plugins:
- [Clickhouse](doc/persistent-clickhouse.md) - [Clickhouse](doc/persistent-clickhouse.md)
- [Custom Score Function](doc/customization.md) - [Custom Score Function](doc/customization.md)
- [Custom Builds](doc/custom-builds.md) - [Custom Builds](doc/custom-builds.md)
- [Extended Keystores (In-Memory)](doc/keystore.md) - [Extended Keystores (In-Memory Index)](doc/keystore.md)
- [Best Practices](#best-practices) - [Best Practices](#best-practices)
- [Page-Load / Fast-Boot](#page-load--fast-boot) - [Page-Load / Fast-Boot](#page-load--fast-boot)
- [Use numeric IDs](#use-numeric-ids) - [Prefer numeric typed IDs](#use-numeric-ids)
## Load Library (Node.js, ESM, Legacy Browser) ## Load Library (Node.js, ESM, Legacy Browser)

11
index.d.ts vendored
View File

@@ -382,7 +382,7 @@ declare module "flexsearch" {
* * Document options: https://github.com/nextapps-de/flexsearch#document-options * * Document options: https://github.com/nextapps-de/flexsearch#document-options
*/ */
type WorkerType = boolean | WorkerURL | WorkerPath type WorkerType = boolean | WorkerURL | WorkerPath;
type DocumentOptions< type DocumentOptions<
D extends DocumentData = DocumentData, D extends DocumentData = DocumentData,
@@ -415,6 +415,7 @@ declare module "flexsearch" {
doc: D | null; doc: D | null;
field?: FieldName[]; field?: FieldName[];
tag?: FieldName[]; tag?: FieldName[];
highlight?: {[field: FieldName]: string};
}>; }>;
type DocumentSearchResults< type DocumentSearchResults<
@@ -451,10 +452,10 @@ declare module "flexsearch" {
E extends boolean = false, E extends boolean = false,
M extends boolean = false M extends boolean = false
> = SearchOptions<R> & { > = SearchOptions<R> & {
tag?: Object | Array<Object>; tag?: {[field: FieldName]: string} | Array<{[field: FieldName]: string}>;
field?: Array<DocumentSearchOptions<D, R, E, M>> | DocumentSearchOptions<D, R, E, M> | string[] | string; field?: Array<DocumentSearchOptions<D, R, E, M>> | DocumentSearchOptions<D, R, E, M> | FieldName[] | FieldName;
index?: Array<DocumentSearchOptions<D, R, E, M>> | DocumentSearchOptions<D, R, E, M> | string[] | string; index?: Array<DocumentSearchOptions<D, R, E, M>> | DocumentSearchOptions<D, R, E, M> | FieldName[] | FieldName;
pluck?: FieldName | DocumentSearchOptions<D, R, E, M>; pluck?: FieldName | DocumentSearchOptions<D, R, E, false>;
highlight?: HighlightOptions | TemplateResultHighlighting; highlight?: HighlightOptions | TemplateResultHighlighting;
enrich?: E; enrich?: E;
merge?: M; merge?: M;