standardSchemaV1
conststandardSchemaV1: <A,I>(schema,overrideOptions?) =>StandardSchemaV1<I,A> &SchemaClass<A,I,never>
Defined in: node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/dts/Schema.d.ts:124
Returns a “Standard Schema” object conforming to the Standard Schema v1 specification.
This function creates a schema whose validate method attempts to decode and
validate the provided input synchronously. If the underlying Schema
includes any asynchronous components (e.g., asynchronous message resolutions
or checks), then validation will necessarily return a Promise instead.
Any detected defects will be reported via a single issue containing no
path.
Type Parameters
Section titled “Type Parameters”A
I
Parameters
Section titled “Parameters”schema
Section titled “schema”Schema<A, I, never>
overrideOptions?
Section titled “overrideOptions?”AST.ParseOptions
Returns
Section titled “Returns”StandardSchemaV1<I, A> & SchemaClass<A, I, never>
Example
Section titled “Example”import { Schema } from "effect"
const schema = Schema.Struct({ name: Schema.String})
// ┌─── StandardSchemaV1<{ readonly name: string; }>// ▼const standardSchema = Schema.standardSchemaV1(schema)3.13.0