Skip to content
API reference

json-schema-subset

Import
import * as api from "@fungi.computer/forage/json-schema-subset";
Kind Export Description
function jsonSchemaSubset() Decode the supported schema subset before using the shared Zod compiler. Refuse depth over 32, more than 50,000 expanded nodes and reserved keys before recursive decoding. Callers bound transport bytes separately.

jsonSchemaSubset()function

Section titled “jsonSchemaSubset()”
Signature
function jsonSchemaSubset(
allowNullable?,
): ZodPipe<
ZodUnknown,
ZodType<
boolean | Record<string, JSONType>,
unknown,
$ZodTypeInternals<boolean | Record<string, JSONType>, unknown>
>
>;

Decode the supported schema subset before using the shared Zod compiler. Refuse depth over 32, more than 50,000 expanded nodes and reserved keys before recursive decoding. Callers bound transport bytes separately.

Parameter Type Default value
allowNullable boolean false

ZodPipe<ZodUnknown, ZodType<boolean | Record<string, JSONType>, unknown, $ZodTypeInternals<boolean | Record<string, JSONType>, unknown>>>