Type definitions must be strings or objects (was undefined)
Type definitions must be strings or objects (was undefined)
. I am not sure what it means. What should I be looking for to solve it?...Function which receives a arktype's 'type'
Conform to an existing type
Using `atLeastLength` on morphed array
Partial Application of the validator
Customizing Error Messages
v2 docs
Pipe chains don't work in rc13
Node of kind optional is not valid as a required definition
Identifying a Date value in an object type
Extenting Type interface
type({}).migrate()
and add it to BaseType
prototype
How do I do it properly?...Morph on failure
const T = type({ id: "string>0", label: "string>0" })
const T = type({ id: "string>0", label: "string>0" })
{ id: string>0, label?: string>=0 }
...Property 'describe' does not exist on type 'instantiateType<inferTupleExpression<...>, {}>'
const create = <T extends number>(code: T) =>
type(["===", code]).describe("abc") as Type<T>;
const create = <T extends number>(code: T) =>
type(["===", code]).describe("abc") as Type<T>;
Piping types no longer works
Post-morph constraints not checked if constraints not met on another property
Is there currently a known issue with arktype + trpc compatibility?
How would you define an object with optional keys, but require at least one of the keys to be filled
const schema = type({ a: type.string.optional(), b: type.string.optional() });
const schema = type({ a: type.string.optional(), b: type.string.optional() });
`scope.validate` for a scope with imports
type.validate
with custom existing scopes is straightforward - just use type.validate<def, scope.t>
However, how do I validate a new scope definition with existing imports/exports?
```ts
import { scope, type } from 'arktype'
...Automatic "full" discriminated union