Skip to content

Commit f6ce779

Browse files
feat(core): export AutocompleteContext type
1 parent bd45a77 commit f6ce779

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export type AutocompleteContext = {
2+
[key: string]: unknown;
3+
};
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { BaseItem } from './AutocompleteApi';
22
import { AutocompleteCollection } from './AutocompleteCollection';
3+
import { AutocompleteContext } from './AutocompleteContext';
34

45
export interface AutocompleteState<TItem extends BaseItem> {
56
selectedItemId: number | null;
@@ -8,5 +9,5 @@ export interface AutocompleteState<TItem extends BaseItem> {
89
collections: Array<AutocompleteCollection<TItem>>;
910
isOpen: boolean;
1011
status: 'idle' | 'loading' | 'stalled' | 'error';
11-
context: { [key: string]: unknown };
12+
context: AutocompleteContext;
1213
}

packages/autocomplete-core/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * from './AutocompleteApi';
22
export * from './AutocompleteCollection';
3+
export * from './AutocompleteContext';
34
export * from './AutocompleteEnvironment';
45
export * from './AutocompleteOptions';
56
export * from './AutocompleteSource';

0 commit comments

Comments
 (0)