Skip to content

Commit

Permalink
feat(core): export AutocompleteContext type
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Dec 5, 2020
1 parent bd45a77 commit f6ce779
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/autocomplete-core/src/types/AutocompleteContext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type AutocompleteContext = {
[key: string]: unknown;
};
3 changes: 2 additions & 1 deletion packages/autocomplete-core/src/types/AutocompleteState.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseItem } from './AutocompleteApi';
import { AutocompleteCollection } from './AutocompleteCollection';
import { AutocompleteContext } from './AutocompleteContext';

export interface AutocompleteState<TItem extends BaseItem> {
selectedItemId: number | null;
Expand All @@ -8,5 +9,5 @@ export interface AutocompleteState<TItem extends BaseItem> {
collections: Array<AutocompleteCollection<TItem>>;
isOpen: boolean;
status: 'idle' | 'loading' | 'stalled' | 'error';
context: { [key: string]: unknown };
context: AutocompleteContext;
}
1 change: 1 addition & 0 deletions packages/autocomplete-core/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './AutocompleteApi';
export * from './AutocompleteCollection';
export * from './AutocompleteContext';
export * from './AutocompleteEnvironment';
export * from './AutocompleteOptions';
export * from './AutocompleteSource';
Expand Down

0 comments on commit f6ce779

Please sign in to comment.