validate carries the spec's own return type — Result | Promise<Result> —
so schemas typed against the spec assign in both directions without a cast.
Do not narrow this to SchemaResult<Output> or widen Promise to
PromiseLike: either change alters structural assignability with Standard
Schema implementations. The bidirectional assignments in
tests/capabilities/core/standard-schema-interop.test.ts guard this exact
boundary.
One parameter is enough even though the spec declares
validate(value, options?): a source whose extra parameter is optional is
assignable to a single-parameter target, verified by that same test against
both the current spec shape and the one-parameter shape libraries ship today.
The framework only ever consumes a schema synchronously; validateSchema
rejects a promise at runtime rather than pretending it cannot happen.
Assignable to the looser StandardSchemaLike the command argument path
accepts, so an s.* schema can validate command arguments too.
A Standard Schema v1 validator.
validatecarries the spec's own return type —Result | Promise<Result>— so schemas typed against the spec assign in both directions without a cast. Do not narrow this toSchemaResult<Output>or widenPromisetoPromiseLike: either change alters structural assignability with Standard Schema implementations. The bidirectional assignments intests/capabilities/core/standard-schema-interop.test.tsguard this exact boundary.One parameter is enough even though the spec declares
validate(value, options?): a source whose extra parameter is optional is assignable to a single-parameter target, verified by that same test against both the current spec shape and the one-parameter shape libraries ship today.The framework only ever consumes a schema synchronously; validateSchema rejects a promise at runtime rather than pretending it cannot happen.
Assignable to the looser StandardSchemaLike the command argument path accepts, so an
s.*schema can validate command arguments too.