mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
12 lines
455 B
TypeScript
12 lines
455 B
TypeScript
declare module 'option-validator' {
|
|
export type ValidatorPath = (string | number)[]
|
|
export type Validator = (value: unknown, type: string, paths: ValidatorPath) => unknown
|
|
export type Scheme = string | Validator | Scheme[] | { [key: string]: Scheme }
|
|
|
|
function optionValidator<T>(option: T, scheme: Scheme, paths?: ValidatorPath): T
|
|
namespace optionValidator {
|
|
const kindOf: (value: unknown) => string
|
|
}
|
|
export default optionValidator
|
|
}
|