Packages

arktype

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

Your version

2.1.16

1 Apr 2025Where it was published

2.2.9 is the newest release of 2.x.

Release note

Fixed an issue causing non-serializable error config to lead to incorrect error messages in some JIT-mode cases

const MyUnion = type('"abc" | "cde"').configure({
	message: () => "fail"
})

// old: "$ark.message"
// new: "fail"
MyUnion.assert("efg")

Added a workaround for environments where global prototypes like FormData have degenerate resolutions like {} (currently the case in @types/bun, see #18689)

const T = type("string.numeric.parse")

// previously, if a global prototype like FormData resolved to {}, it prevented
// ArkType from extracting the input/output of morphs, leading to inference like the following:

// old (with @bun/types): (In: string) => To<number>
// new (with @bun/types): number
type Parsed = typeof T.inferOut