Loading...
Loading...
ArkType runtime validation with TypeScript-native syntax. Type-safe schemas using string expressions, morphs, scopes, and generics. Use when defining schemas, validating data, transforming input, or building type-safe APIs with ArkType.
npx skill4agent add oakoss/agent-skills arktype-validationarktype| Pattern | Usage |
|---|---|
| Define object schema |
| Primitive type |
| Built-in string validators |
| Built-in string morphs (transforms) |
| Parse JSON string to validated object |
| Inline constraints |
| Union types |
| String literal unions |
| Array types |
| Optional properties |
| Default values |
| Transform output (morphs) |
| Custom validation (like Zod refine) |
| Object property selection |
| Combine object types |
| Named type scopes with cross-references |
| Generic type definitions |
| Error handling (check |
| Global defaults (from |
| Type-safe pattern matching (2.1) |
| Inline undeclared key handling |
| Mistake | Fix |
|---|---|
| |
Checking errors with | Use |
| |
Importing from | Import |
Nested | Use |
Raw | Use |
| |
Configuring after importing | Import |