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

x/arktype/parse/ast/ast.ts>validateString

TypeScript's 1:1 validator, optimized from editor to runtime
Latest
type alias validateString
import { type validateString } from "https://deno.land/x/arktype@v1.0.10-alpha/parse/ast/ast.ts";

Type Parameters

def extends string
$
definition: parseString<def, $> extends infer ast ? ast extends error<infer message> ? message : validateAst<ast, $> extends error<infer message> ? message : def : never