type(...) definitions as the shapes they describe, the same way the zod and Valibot plugins do. It understands ArkType’s string syntax, so "1 <= string <= 280" reads as “text (at least 1 long, at most 280 long)” and "'admin' | 'member'" reads as one of two values. Calling a schema reads as validating data with it.
library: { name: "arktype", versions: ">=2 <3" }. It only reads type and scope when they are imported from arktype, so a local function named type is left alone.
Examples
Definitions
English
Validation
English
What it covers
- Object definitions with optional keys, nested objects and arrays.
- The string syntax: keywords such as
string.email,string.uuidandnumber.integer, bounds, unions, arrays, defaults, divisors and parsing keywords likestring.numeric.parse. - Chained methods and statics such as
.array(),.or(),.and(),.pipe(),.narrow(),.optional(),.default()andtype.enumerated. - Validation: calling a schema,
type.errors,assertandallows. scope(...)with its named schemas.
Translating
The English phrasebook is exported asen and typed as ArkTypePhrases.