Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/arktype/parse/definition.ts>validateDefinition

TypeScript's 1:1 validator, optimized from editor to runtime
Latest
type alias validateDefinition
import { type validateDefinition } from "https://deno.land/x/arktype@v1.0.10-alpha/parse/definition.ts";
definition: [def] extends [(...args: any[]) => any] ? def : [def] extends [Terminal] ? def : [def] extends [string] ? validateString<def, $> : [def] extends [TupleExpression] ? validateTupleExpression<def, $> : [def] extends [BadDefinitionType] ? writeBadDefinitionTypeMessage<objectKindOf<def> extends string ? objectKindOf<def> : domainOf<def>> : isUnknown<def> extends true ? unknownDefinitionMessage : [def] extends [readonly unknown[]] ? [k in keyof def]: validateDefinition<def[k], $> : evaluate<[k in keyof def]: validateDefinition<def[k], $>>