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.
.configure({}, selector) fixes
const User = type({
name: "string",
platform: "'android' | 'ios'",
"version?": "number | string"
})
// prior to 2.1.15, the selector was not applied
// when configuring references
const ConfiguredUser = User.configure(
{ description: "A STRING" },
{
kind: "domain",
where: d => d.domain === "string"
}
)
// old: A STRING
// new: A STRING
ConfiguredUser.get("name").description
// old: A STRING
// new: "android" | "ios"
ConfiguredUser.get("platform").description
// old: A STRING or undefined
// new: a number, A STRING or undefined
ConfiguredUser.get("version").descriptionWith the much more powerful .configure + selector API now available, the internal .withMeta method was removed as it can be trivially achieved via a self-selector:
// < 2.1.15
myType.withMeta("some shallow description")
// >= 2.1.15
myType.configure("some shallow description", "self")