Skip to content

Commit

Permalink
fix(js): add templates type to getSources
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Nov 16, 2020
1 parent 98148e7 commit 69b9718
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/autocomplete-js/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ export type InternalAutocompleteSource<TItem> = InternalAutocompleteCoreSource<
> &
SourceTemplates<TItem>;

type GetSources<TItem> = (
params: GetSourcesParams<TItem>
) => MaybePromise<Array<AutocompleteCoreSource<TItem>>>;

export type AutocompleteClassNames = Partial<{
root: string;
form: string;
Expand Down Expand Up @@ -93,7 +89,9 @@ export interface AutocompleteOptions<TItem>
* 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<TItem>;
getSources?: (
params: GetSourcesParams<TItem>
) => MaybePromise<Array<AutocompleteSource<TItem>>>;
/**
* The panel horizontal position.
*
Expand Down

0 comments on commit 69b9718

Please sign in to comment.