mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
refactor(core): CORE-05 separate typed defaults and resolved options
This commit is contained in:
1 parent
4eec8112fa
commit
97d320bd74
27 files changed
+2278
-240
No files matched your search
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user