From 24a4aee4979dd3ce5d0dd683945c74f7b32f5acc Mon Sep 17 00:00:00 2001 From: Richard Scotten Date: Mon, 16 Sep 2019 13:19:25 -0700 Subject: [PATCH] fixed places type errors for @types/algoliasearch (#38407) * fixed some type errors for algolia places * added myself to authors list in header * updated version and repository path in the header --- types/algoliasearch/index.d.ts | 48 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index 116365a4f7..f9aa26ce42 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -1,5 +1,5 @@ -// Type definitions for algoliasearch-client-js 3.30.2 -// Project: https://github.com/algolia/algoliasearch-client-js +// Type definitions for algoliasearch-client-javascript 3.34.0 +// Project: https://github.com/algolia/algoliasearch-client-javascript // Definitions by: Baptiste Coquelle // Haroen Viaene // Samuel Vaillant @@ -11,6 +11,7 @@ // Dan Grayson // Peter Esenwa // Samuel Bodin +// Richard Scotten // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -2023,14 +2024,11 @@ declare namespace algoliasearch { * The associated highlighting information. * https://community.algolia.com/places/api-clients.html#api-suggestion-highlightResult */ - highlightResult: { + _highlightResult: { administrative: highlightResultValueInterface; - country: { - default: highlightResultValueInterface; - [key: string]: highlightResultValueInterface; - }; - county: { default: string; [key: string]: string }; - locale_names: { default: string[]; [key: string]: string[] }; + country: highlightResultValueInterface; + county?: highlightResultValueInterface; + locale_names: highlightResultValueInterface[]; postcode: highlightResultValueInterface[]; } /** @@ -2039,7 +2037,7 @@ declare namespace algoliasearch { */ locale_names: string[]; admin_level: number; - district: string; + district?: string; importance: number; is_city: boolean; is_country: boolean; @@ -2047,7 +2045,7 @@ declare namespace algoliasearch { is_popular: boolean; is_suburb: boolean; objectID: string; - tags: string[]; + _tags: string[]; } /** @@ -2099,23 +2097,20 @@ declare namespace algoliasearch { * The associated highlighting information. * https://community.algolia.com/places/api-clients.html#api-suggestion-highlightResult */ - highlightResult: { - administrative: highlightResultValueInterface; - country: { - default: highlightResultValueInterface; - [key: string]: highlightResultValueInterface; - }; - county: { default: string; [key: string]: string }; - locale_names: { default: string[]; [key: string]: string[] }; - postcode: highlightResultValueInterface[]; - } + _highlightResult: { + administrative: highlightResultValueInterface; + country: highlightResultValueInterface; + county?: highlightResultValueInterface; + locale_names: highlightResultValueInterface[]; + postcode: highlightResultValueInterface[]; + } /** * https://community.algolia.com/places/api-clients.html#api-suggestion-name * List of names of the place. If no language parameter is specified, retrieves all of them. */ locale_names: { default: string[]; [key: string]: string[] }; admin_level: number; - district: string; + district?: string; importance: number; is_city: boolean; is_country: boolean; @@ -2123,16 +2118,17 @@ declare namespace algoliasearch { is_popular: boolean; is_suburb: boolean; objectID: string; - tags: string[]; + _tags: string[]; } /** * Interface use in HitInterface for some key of highlightResult. */ interface highlightResultValueInterface { - value: string; - matchLevel: string; - matchedWords: string[]; + fullyHighlighted?: boolean; + matchLevel: string; + matchedWords: string[]; + value: string; } }