Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456 ArkType: TypeScript's 1:1 validator, optimized from editor to runtime
ArkType uses set theory to understand and expose the relationships between your types at runtime the way TypeScript does at compile time
User.extends("object") // trueUser.extends("string") // false// true (string is narrower than unknown)User.extends({ name: "unknown"})// false (string is wider than "Alan")User.extends({ name: "'Alan'"})
Intrinsic Optimization
Every schema is internally normalized and reduced to its purest and fastest representation
// all unions are optimally discriminated// even if multiple/nested paths are neededconstAccount= type({ kind: "'admin'", "powers?": "string[]"}).or({ kind: "'superadmin'", "superpowers?": "string[]"}).or({ kind: "'pleb'"})