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'"})