Packages

arktype

2.2.9 · 20 Oct 2026MIT3.4M / weekRepositoryHomepagenpmAtom feed

Your version

2.2.8

7 Oct 2026Where it was published

2.2.9 is the newest release of 2.x.

Release note

The section about arktype of a note shared by several packages.

Add string.base58

Validates base58-encoded strings, which use the Bitcoin alphabet (no 0, O, I or l):

const Base58 = type("string.base58")

// valid
Base58("3mJr7AoUXx2Wqd")
// ArkErrors: must be base58-encoded (was "0OIl")
Base58("0OIl")

Return empty props for object

type("object").props threw instead of returning the empty list of properties, like type({}).props does (#1682, fixes #1177).

Keep object values from meta in JSON Schema

Meta values that aren't primitives, like an object or array default or a custom key like x-unit, were emitted as internal $ark references instead of their JSON values (#1677). Defaults that aren't valid JSON, including functions, now go through the defaultValue fallback.

Report invalid generic definitions on TypeScript 7

TypeScript 7 only reports the error of the last overload that fails, which for an invalid generic definition was the tuple expression signature rather than ArkType's own message (#1681):

// TypeScript 7 previously: Argument of type '"<n extends nummer>"' is not assignable to parameter of type '"Array" | ...
// now: 'nummer' is unresolvable
type("<n extends nummer>", "n > 0")

The generic and tuple expression signatures of type are now a single signature, so TypeScript 6 and 7 report the same errors directly, and errors in a generic's body point at the invalid property.