15 lines
705 B
TypeScript
Raw Normal View History

2024-01-29 09:26:07 +08:00
import type { SelectGroupOption, SelectBaseOption } from '../../select/src/interface';
export type AutoCompleteOption = SelectBaseOption<string, string>;
export interface AutoCompleteGroupOption extends Omit<SelectGroupOption, 'children'> {
children: AutoCompleteOptions;
}
export type AutoCompleteOptions = Array<AutoCompleteOption | AutoCompleteGroupOption | string>;
export type OnUpdateValue = (value: string & (string | null)) => void;
export type OnUpdateImpl = (value: string | null) => void;
export type OnSelect = (value: string & number) => void;
export type OnSelectImpl = (value: string | number) => void;
export interface AutoCompleteInst {
focus: () => void;
blur: () => void;
}