Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/arktype/utils/serialize.ts>snapshot

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

Type Parameters

t
optional
depth extends 1[] = []
definition: isTopType<t> extends true ? unknown : t extends Primitive ? snapshotPrimitive<t> : t extends Function ? `(function${string})` : depth["length"] extends 10 ? unknown : t extends List<infer item> ? List<snapshot<item, [...depth, 1]>> : [k in keyof t]: snapshot<t[k], [...depth, 1]>
variable snapshot
import { snapshot } from "https://deno.land/x/arktype@v1.0.10-alpha/utils/serialize.ts";

type

<t>(data: t, opts?: SerializationOptions) => unknown