MCPcopy Create free account
hub / github.com/arktypeio/arktype / serialize

Function serialize

ark/schema/shared/compile.ts:380–384  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

378 }
379
380 serialize(value: unknown): string {
381 return hasDomain(value, "object") || typeof value === "symbol" ?
382 this.ref(value)
383 : serializePrimitive(value as never)
384 }
385
386 /** validates that a numeric literal interpolated into generated JS is a number */
387 num(n: number): string {

Callers

nothing calls this directly

Calls 3

hasDomainFunction · 0.90
serializePrimitiveFunction · 0.90
refMethod · 0.45

Tested by

no test coverage detected