Skip to content

@oona/vlo / host / Validator

Interface: Validator ​

Defined in: sdk/ts/sdk/src/host/context.ts:22

The parts of a Zod schema the host actually uses. Structural, so Activity and SignalDef satisfy it without the host importing zod — and without fighting the invariance of z.ZodType when the registry erases the schema's type.

Methods ​

safeParse() ​

safeParse(value): { data: unknown; success: true; } | { error: { issues: readonly object[]; message: string; }; success: false; }

Defined in: sdk/ts/sdk/src/host/context.ts:24

Zod's safeParse shape: never throws, reports issues on failure.

Parameters ​

value ​

unknown

Returns ​

{ data: unknown; success: true; } | { error: { issues: readonly object[]; message: string; }; success: false; }