Skip to main content

Function: validate()

validate<T>(schema, input): Type<T>
Defined in: schemas.ts:163 Decode input against schema synchronously, throwing on failure. Use when the input is already trusted and you’d rather propagate the error than handle it locally — typically inside a wrapping try/catch or further up the call stack. For caller-friendly handling use validateSafe instead.

Type Parameters

T

T extends AnySchema

Parameters

schema

T

input

unknown

Returns

Type<T>

Throws

The Effect parse error from decodeUnknownSync.