types: using exact component instance type (#9256)

This commit is contained in:
neverland
2021-08-13 09:59:44 +08:00
committed by GitHub
parent f0f2059d91
commit 42888a1c22
14 changed files with 43 additions and 51 deletions
+3 -3
View File
@@ -32,15 +32,15 @@ export type PickerColumn = PickerOption[] | PickerObjectColumn;
export type PickerExpose = {
confirm: () => void;
getValues: () => PickerOption[];
getValues: <T = PickerOption>() => T[];
setValues: (values: string[]) => void;
getIndexes: () => number[];
setIndexes: (indexes: number[]) => void;
getColumnIndex: (index: number) => number;
setColumnIndex: (columnIndex: number, optionIndex: number) => void;
getColumnValue: (index: number) => PickerOption;
getColumnValue: <T = PickerOption>(index: number) => T;
setColumnValue: (index: number, value: string) => void;
getColumnValues: (index: number) => PickerOption[];
getColumnValues: <T = PickerOption>(index: number) => T[];
setColumnValues: (index: number, options: PickerOption[]) => void;
};