📢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 🧵
ArkType
@arktype.io
TypeScript's 1:1 validator, optimized from editor to runtime ⛵ ⭐http://github.com/arktypeio/arktype 👋http://arktype.io/discord
all you need to "learn" ArkType syntax: 1️⃣ start with a typescript keyword 2️⃣ .autocomplete to discover constraints 3️⃣ compose if needed with &, |, etc.
tools are just introspectable functions... what if you could define them like this?🤔
🚨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
🎉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🔁
Introducing ✨ Standard JSON Schema ✨ It's a sister spec to Standard Schema that provides a common interface for any entity that can be converted to JSON Schema
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
Difficulty of Parsing Regex with TypeScript Types ------------------------------------------------------------ group associativity ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ everything else ▒▒
In the next version of ArkType, any Standard Schema is a valid definition. Zod migration is about to get a whole lot easier🚀
📈arkregex just hit 100k installs/week📈 if you're still using untyped RegExp() you may as well just write raw .js
problem: your RegExp is beyond human comprehension solution: pnpm i arkregex
I'll take "meticulously typed regex features you probably didn't know existed" for $500
in the latest version of arktype: regex properties and index signatures from arkregex🔒
arkregex is ridiculously optimized. even expressions like this are inferred instantly. but what about the most extreme cases?🧵
📢Introducing ArkRegex📢 a drop in replacement for new RegExp() with types ⬇️
new to typescript? here's a handy little type for parsing regular expressions: