ArkType

@arktype.io

TypeScript's 1:1 validator, optimized from editor to runtime ⛵ ⭐http://github.com/arktypeio/arktype 👋http://arktype.io/discord

📢ArkType 2.2 is here. This is a big one, and it's long overdue. Validated functions, type-safe regex, bidirectional JSON Schema, and universal schema interop. Here's what's new 🧵

Bild

all you need to "learn" ArkType syntax: 1️⃣ start with a typescript keyword 2️⃣ .autocomplete to discover constraints 3️⃣ compose if needed with &, |, etc.

🚨Standard JSON Schema v1 just dropped🚨 🟢libraries can now accept ArkType wherever they need JSON Schema 🟢100% type-safe with inference built-in 🟢day one support from AI SDK 🟢TanStack AI and MCP SDK support imminent

Bild

🎉Announcing Standard JSON Schema🎉 The next spec in the Standard Schema family is here to bring library-agnostic JSON Schema to TS. Let's make sure everyone sees it🔁

Bild

95% of ArkType syntax is just TypeScript. The other 5% are extensions like this that are... ✅composable ✅consistent across data types ✅100% safe with helpful type-level error messages

Bild

Difficulty of Parsing Regex with TypeScript Types ------------------------------------------------------------ group associativity ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ everything else ▒▒

Bild

In the next version of ArkType, any Standard Schema is a valid definition. Zod migration is about to get a whole lot easier🚀

Bild

📈arkregex just hit 100k installs/week📈 if you're still using untyped RegExp() you may as well just write raw .js

Bild

arkregex is ridiculously optimized. even expressions like this are inferred instantly. but what about the most extreme cases?🧵

Bild