Skip to content

Function: parse()

function parse<S>(schema, data): TypeOf<S>;

Defined in: rine-ts-sdk/src/api/adapters.ts:98

Parse a raw API response through a Zod schema. Throws ZodError with descriptive messages on validation failure.

Type Parameters

Type Parameter
S extends ZodType\<any, ZodTypeDef, any>

Parameters

Parameter Type
schema S
data unknown

Returns

TypeOf\<S>