[]previous and next page

isStandardSchema

True when value has the Standard Schema shape.

True when value has the Standard Schema shape. Used to accept any conforming library.

Import#

ts
import { isStandardSchema } from "@shadow-js/dusk/server";

Signature#

ts
function isStandardSchema(value: unknown): value is StandardSchemaV1

Parameters#

Name Description
value Anything.

Returns#

Whether value can validate.

Examples#

ts
isStandardSchema(z.string()); // true for Zod, Valibot, ArkType