

declare const enum LibTestType {
    empty,
    mobile,
}

interface LibTestOption {

    handle:Record<string, (value:any)=>boolean>,

    verification:(data:LibDataArray | LibData,toast?:boolean|string)=>LibTestItemResult,

    verificationPromise:(data:LibDataArray | LibData,toast?:boolean|string)=>Promise<Record<string, Record<string, any>>>,

    verificationItem:(data:LibData,toast?:boolean|string)=>any,
    
}

type LibTestOptions = {
    [key in LibTestType]:(value:any,option:LibData)=> boolean
} & LibTestOption

interface LibTestItemResult {

    // 是否验证通过
    verification: boolean,

    // 值 验证不通过 value 为 message
    value:any,

    // 校验不通过的类型
    type?: LibTestType

}