Archived
substitute S for T in SearchFn sort
This commit is contained in:
Vendored
+1
-1
@@ -70,7 +70,7 @@ export declare type Terms<T> = {
|
|||||||
* A `SearchFn` function matches documents in a single collection and returns a `SearchResult` based on the given
|
* A `SearchFn` function matches documents in a single collection and returns a `SearchResult` based on the given
|
||||||
* `terms`, `limit`, and `sort`.
|
* `terms`, `limit`, and `sort`.
|
||||||
*/
|
*/
|
||||||
export declare type SearchFn<T extends Searchable, S extends Searchable = T> = (terms?: Terms<Document<DeepNonNullable<S>>>, limit?: Limit, sort?: Sort<Document<T>>[] | Sort<Document<T>>) => Promise<SearchResult<T>>;
|
export declare type SearchFn<T extends Searchable, S extends Searchable = T> = (terms?: Terms<Document<DeepNonNullable<S>>>, limit?: Limit, sort?: Sort<Document<S>>[] | Sort<Document<S>>) => Promise<SearchResult<T>>;
|
||||||
/**
|
/**
|
||||||
* Search results are a tuple of three values:
|
* Search results are a tuple of three values:
|
||||||
* 1. The **total** number of matching documents in the searched collection, ignoring limit
|
* 1. The **total** number of matching documents in the searched collection, ignoring limit
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ export type Terms<T> = {
|
|||||||
export type SearchFn<T extends Searchable, S extends Searchable = T> = (
|
export type SearchFn<T extends Searchable, S extends Searchable = T> = (
|
||||||
terms?: Terms<Document<DeepNonNullable<S>>>,
|
terms?: Terms<Document<DeepNonNullable<S>>>,
|
||||||
limit?: Limit,
|
limit?: Limit,
|
||||||
sort?: Sort<Document<T>>[] | Sort<Document<T>>
|
sort?: Sort<Document<S>>[] | Sort<Document<S>>
|
||||||
) => Promise<SearchResult<T>>
|
) => Promise<SearchResult<T>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user