MCPcopy Create free account
hub / github.com/Effect-TS/effect / runSchemaErrorSync

Function runSchemaErrorSync

packages/effect/src/Schema.ts:1582–1590  ·  view source on GitHub ↗
(
  self: Effect.Effect<A, SchemaError>
)

Source from the content-addressed store, hash-verified

1580}
1581
1582function runSchemaErrorSync<A>(
1583 self: Effect.Effect<A, SchemaError>
1584): A {
1585 const exit = Effect.runSyncExit(self)
1586 if (Exit_.isSuccess(exit)) {
1587 return exit.value
1588 }
1589 throw getSchemaErrorOrThrow(exit.cause, "Sync adapter can only throw schema errors")
1590}
1591
1592/**
1593 * Decodes an `unknown` input against a schema synchronously, returning an

Callers 2

decodeUnknownSyncFunction · 0.85
encodeUnknownSyncFunction · 0.85

Calls 1

getSchemaErrorOrThrowFunction · 0.85

Tested by

no test coverage detected