neovim-mark@2x
Bun Logo

ArkType

TypeScript's 1:1 validator, optimized from editor to runtime

Loading playground...

Type-level feedback with each keystroke- no plugins or build steps required.

Types You Already Know

TypeScript's syntax, with autocomplete inside every string
const  = type({
	name: "string",
	platform: "'android' | 'ios'",
	"version?": "number | s
  • number | string
  • number | symbol
"
})

Better Errors

Messages say what was expected and what arrived, and every one is customizable
const  = User({ name: "Alan Turing", platform: "enigma" })

if ( instanceof type.errors) console.error(.summary)
// ArkErrors: platform must be "android" or "ios" (was "enigma")

Clarity and Concision

A mistake in a definition is a type error that says what's wrong, right where you made it
// hover me
const  = type({
	name: "string",
	platform: "'android' | 'ios'",
	"versions?": "number | string)[]"
TypeScript: Unmatched ) before []​
})

Faster... everything

20x faster than Zod 4 and 2,000x faster than Yup at runtime, and ready for TypeScript 7's native compiler in your editor
Object Validation, Node v23.6.1
(source)
ArkType ⚡ 14 nanoseconds
   Zod 👍 281 nanoseconds
   Yup 🐌 40755 nanoseconds*
*scaling generously logarithmized

Deep Introspectability

Check whether one type extends another at runtime, the way TypeScript does at compile time
.extends("object") // true
.extends({ name: "string" }) // true
.extends({ name: "'Alan'" }) // false

Intrinsic Optimization

Every type is reduced to its simplest form before it validates anything
const  = type("number > 0")
const  = .and("number >= 10")

.expression // "number >= 10"

Teach your agent ArkType

Install the skill, and Claude Code, Codex or Cursor write definitions with current syntax instead of guessing from whatever they saw in training. Every docs page is also Markdown: add .md to its URL, or point your agent at /llms.txt.

npx skills add arktypeio/arktype