Search for a command to run...
Runtime type validator that mirrors TypeScript's type syntax, giving you editor feedback and runtime safety from a single definition. Uses familiar type expressions like "string", "number | null", or nested object shapes, so TypeScript users can define schemas without learning a new DSL. Validates unknown data at runtime and returns either typed values or detailed, customizable error summaries.
ArkType stands out by offering type-level autocomplete and inline validation as you type, with no plugins or build steps. Schemas are internally normalized and optimized for fast validation, and the library exposes set-theoretic relationships at runtime so you can check things like User.extends("object") the way TypeScript does at compile time. Pairs well with strict TypeScript configs and optional VSCode or JetBrains extensions for embedded syntax highlighting.
Key features:
Use cases: validating API responses, form inputs, and configuration at runtime while keeping full TypeScript inference. Fits projects that want a single source of truth for types and validation, or teams migrating from Zod or Yup who prefer native type syntax and stronger editor support.