Skip to content

Commit

Permalink
fix(types): result val type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyhom committed Aug 28, 2022
1 parent e89c577 commit c7471b9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ import MobileSelect from "../ms-core";
export type CascadeData = {
[k: string]: any;
};

export type ResultVal = number | string | CascadeData;

export interface CallbackFn {
(curValue: ResultVal[], indexArr: number[], context: MobileSelect): void;
(
curValue: string[] | number[] | CascadeData[],
indexArr: number[],
context: MobileSelect
): void;
}
export interface OldCallbackFn {
(indexArr: number[], curValue: ResultVal[], context: MobileSelect): void;
(
indexArr: number[],
curValue: string[] | number[] | CascadeData[],
context: MobileSelect
): void;
}

export type KeyMap = { id: string; value: string; childs: string };
Expand Down

0 comments on commit c7471b9

Please sign in to comment.