From 69b97188dc570ef1082287576eae01ef4c505947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Mon, 16 Nov 2020 20:45:17 +0100 Subject: [PATCH] fix(js): add `templates` type to `getSources` --- packages/autocomplete-js/src/types/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/autocomplete-js/src/types/index.ts b/packages/autocomplete-js/src/types/index.ts index 6c4b1eaf7..4afb78d75 100644 --- a/packages/autocomplete-js/src/types/index.ts +++ b/packages/autocomplete-js/src/types/index.ts @@ -50,10 +50,6 @@ export type InternalAutocompleteSource = InternalAutocompleteCoreSource< > & SourceTemplates; -type GetSources = ( - params: GetSourcesParams -) => MaybePromise>>; - export type AutocompleteClassNames = Partial<{ root: string; form: string; @@ -93,7 +89,9 @@ export interface AutocompleteOptions * You can either pass a [CSS selector](https://developer.mozilla.org/docs/Web/CSS/CSS_Selectors) or an [Element](https://developer.mozilla.org/docs/Web/API/HTMLElement). The first element matching the provided selector will be used as container. */ container: string | HTMLElement; - getSources?: GetSources; + getSources?: ( + params: GetSourcesParams + ) => MaybePromise>>; /** * The panel horizontal position. *