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

Function decodeUnknownEffect

packages/effect/src/Schema.ts:1535–1543  ·  view source on GitHub ↗
(schema: S, options?: SchemaAST.ParseOptions)

Source from the content-addressed store, hash-verified

1533 * @since 4.0.0
1534 */
1535export function decodeUnknownEffect<S extends Constraint>(schema: S, options?: SchemaAST.ParseOptions) {
1536 const parser = SchemaParser.decodeUnknownEffect(schema, options)
1537 return (
1538 input: unknown,
1539 options?: SchemaAST.ParseOptions
1540 ): Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]> => {
1541 return fromIssueEffect(parser(input, options))
1542 }
1543}
1544/**
1545 * Decodes a typed input (the schema's `Encoded` type) against a schema,
1546 * returning an `Effect` that succeeds with the decoded value or fails with a

Callers 4

decodeUnknownPromiseFunction · 0.70
decodeUnknownSyncFunction · 0.70
validateFunction · 0.50
verifyRoundTripEffectMethod · 0.50

Calls 2

fromIssueEffectFunction · 0.85
parserFunction · 0.70

Tested by

no test coverage detected