From c7471b936f1cd4523618ec26455587767296b486 Mon Sep 17 00:00:00 2001 From: onlyhom Date: Sun, 28 Aug 2022 19:09:22 +0800 Subject: [PATCH] fix(types): result val type fix --- src/types/index.d.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/types/index.d.ts b/src/types/index.d.ts index feab6b1..30f8cab 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -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 };