Type Alias ParameterVerifyType

ParameterVerifyType:
    | ParameterSimpleType
    | AddQuestionMark<Exclude<ParameterSimpleType, "required">>
    | ["instanceof", Function]
    | ["?instanceof", Function]
    | ["custom", VerifyCustomType]
    | ["?custom", VerifyCustomType]
    | ["custom", VerifyCustomType, string]
    | ["?custom", VerifyCustomType, string]

参数验证类型,以下所有验证前面皆可加?,表示该验证为可选的,例如['?number']
ParameterSimpleType 简单参数验证类型
['instanceof', Function] instanceof验证,验证参数应该继承自某个类
['custom', VerifyCustomType] 自定义验证,传入自定义验证方法
['custom', VerifyCustomType, string] 自定义验证,传入自定义验证方法和自定义错误信息