Skip to content

Commit

Permalink
fix(js): fix source types
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Sep 9, 2020
1 parent fda47a7 commit 9913fe1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/autocomplete-js/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import {
GetSourcesParams,
AutocompleteSetters as AutocompleteCoreSetters,
PublicAutocompleteOptions as PublicAutocompleteCoreOptions,
AutocompleteSource as AutocompleteCoreSource,
AutocompleteState as AutocompleteCoreState,
PublicAutocompleteOptions as PublicAutocompleteCoreOptions,
PublicAutocompleteSource as PublicAutocompleteCoreSource,
GetSourcesParams,
} from '@algolia/autocomplete-core';

type Template<TParams> = (params: TParams) => string | void;

export type AutocompleteSource<TItem> = PublicAutocompleteCoreSource<TItem> & {
export type AutocompleteSource<TItem> = AutocompleteCoreSource<TItem> & {
/**
* Templates to display in the autocomplete dropdown.
*
Expand Down Expand Up @@ -43,8 +44,8 @@ export type AutocompleteSource<TItem> = PublicAutocompleteCoreSource<TItem> & {
type GetSources<TItem> = (
params: GetSourcesParams<TItem>
) =>
| Array<AutocompleteSource<TItem>>
| Promise<Array<AutocompleteSource<TItem>>>;
| Array<PublicAutocompleteCoreSource<TItem>>
| Promise<Array<PublicAutocompleteCoreSource<TItem>>>;

export interface AutocompleteOptions<TItem>
extends PublicAutocompleteCoreOptions<TItem> {
Expand Down

0 comments on commit 9913fe1

Please sign in to comment.