mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-29 16:50:13 +02:00
replace unknown type in index.d.ts
This commit is contained in:
8
index.d.ts
vendored
8
index.d.ts
vendored
@@ -994,16 +994,16 @@ declare module "flexsearch" {
|
||||
|
||||
constructor(options?: ResolverOptions<D, W, S> | IntermediateSearchResults);
|
||||
|
||||
and<R extends boolean = false>(...args: ResolverOptions<D, W, S, unknown, R>[]):
|
||||
and<R extends boolean = false>(...args: ResolverOptions<D, W, S, false, R>[]):
|
||||
IndexSearchResultsWrapper<W, S, R, D>;
|
||||
|
||||
or<R extends boolean = false>(...args: ResolverOptions<D, W, S, unknown, R>[]):
|
||||
or<R extends boolean = false>(...args: ResolverOptions<D, W, S, false, R>[]):
|
||||
IndexSearchResultsWrapper<W, S, R, D>;
|
||||
|
||||
xor<R extends boolean = false>(...args: ResolverOptions<D, W, S, unknown, R>[]):
|
||||
xor<R extends boolean = false>(...args: ResolverOptions<D, W, S, false, R>[]):
|
||||
IndexSearchResultsWrapper<W, S, R, D>;
|
||||
|
||||
not<R extends boolean = false>(...args: ResolverOptions<D, W, S, unknown, R>[]):
|
||||
not<R extends boolean = false>(...args: ResolverOptions<D, W, S, false, R>[]):
|
||||
IndexSearchResultsWrapper<W, S, R, D>;
|
||||
|
||||
limit(limit: number): Resolver<D, W, S>;
|
||||
|
@@ -193,10 +193,12 @@ async function test_document() {
|
||||
const doc26: EnrichedResults = doc24.and({}, { index: document2 }).resolve({ enrich: true });
|
||||
// highlight within last resolver stage is work in progress:
|
||||
const doc27: EnrichedResults = doc24.and({}, { index: document2, resolve: true, highlight: "" });
|
||||
const doc28: DefaultSearchResults = document2.search({ pluck: { field: "meta:title", limit: 10 } });
|
||||
const doc30: EnrichedResults = document2.search({ pluck: { field: "meta:title", highlight: true } });
|
||||
|
||||
// highlight on .resolve() is never supported:
|
||||
// @ts-expect-error
|
||||
const doc28: EnrichedResults = doc24.resolve({ highlight: "" });
|
||||
const err0: EnrichedResults = doc24.resolve({ highlight: "" });
|
||||
|
||||
// @ts-expect-error
|
||||
const err1: DocumentData = doc1[0].result[0].doc;
|
||||
|
Reference in New Issue
Block a user