mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
fix(algoliasearch): remove duplicate and buggy AlgoliaResponse interface
the typings would still provide the old `AlgoliaResponse` interface, which is a _almost_ duplicate interface of `Response`, although it is not called anywhere else. Moreover, `AlgoliaResponse` was buggy (namely, the `nbPages` attribute was declared as `nbPage`. It is more safe to have only one interface that works, so I deleted the old `AlgoliaResponse` interface.
This commit is contained in:
46
types/algoliasearch/index.d.ts
vendored
46
types/algoliasearch/index.d.ts
vendored
@@ -1406,52 +1406,6 @@ declare namespace algoliasearch {
|
||||
userData?: string | object;
|
||||
}
|
||||
|
||||
interface AlgoliaResponse {
|
||||
/**
|
||||
* Contains all the hits matching the query
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
hits: any[];
|
||||
/**
|
||||
* Current page
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Number of total hits matching the query
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
nbHits: number;
|
||||
/**
|
||||
* Number of pages
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
nbPage: number;
|
||||
/**
|
||||
* Number of hits per pages
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
hitsPerPage: number;
|
||||
/**
|
||||
* Engine processing time (excluding network transfer)
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
processingTimeMS: number;
|
||||
/**
|
||||
* Query used to perform the search
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
query: string;
|
||||
/**
|
||||
* GET parameters used to perform the search
|
||||
* https://github.com/algolia/algoliasearch-client-js#response-format
|
||||
*/
|
||||
params: string;
|
||||
facets: {
|
||||
[facetName: string]: { [facetValue: string]: number };
|
||||
};
|
||||
}
|
||||
|
||||
namespace SearchForFacetValues {
|
||||
interface Parameters extends QueryParameters {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user