arktype
2.2.9 · 20 Oct 2026MIT3.4M / weekRepositoryHomepagenpmAtom feed
Your version
2.2.9 is the newest release of 2.x.
Release note
The section about arktype of a note shared by several packages.
es2020 compatibility
Remove usages of newer prototypes methods like .at() to better support legacy browsers
improve external generic inference
Some inference scenarios like the following involving default values are now more cooperative (thanks @Andarist) 🎉
function someFunction<TSchema extends Record<string, any>>(
schema: Type<TSchema, {}>
): (typeof schema)["infer"] {
const someData = { hello: "world" }
return schema.assert(someData)
}
const schema = type({
hello: type("string").pipe(s => s === "world"),
goodbye: "string='blah'"
})
someFunction(schema)