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

Function runSchemaErrorSync

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

Source from the content-addressed store, hash-verified

1317}
1318
1319function runSchemaErrorSync<A>(
1320 self: Effect.Effect<A, SchemaError>
1321): A {
1322 const exit = Effect.runSyncExit(self)
1323 if (Exit_.isSuccess(exit)) {
1324 return exit.value
1325 }
1326 throw getSchemaErrorOrThrow(exit.cause, "Sync adapter can only throw schema errors")
1327}
1328/**
1329 * Returns a "Standard Schema" object conforming to the [Standard Schema
1330 * v1](https://standardschema.dev/) specification.

Callers 2

decodeUnknownSyncFunction · 0.85
encodeUnknownSyncFunction · 0.85

Calls 1

getSchemaErrorOrThrowFunction · 0.85

Tested by

no test coverage detected