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

Function decodeUnknownResult

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

Source from the content-addressed store, hash-verified

1758 * @since 4.0.0
1759 */
1760export function decodeUnknownResult<S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) {
1761 const parser = SchemaParser.decodeUnknownResult(schema, options)
1762 return (input: unknown, options?: SchemaAST.ParseOptions): Result_.Result<S["Type"], SchemaError> => {
1763 return Result_.mapError(parser(input, options), (issue) => new SchemaError(issue))
1764 }
1765}
1766
1767/**
1768 * Decodes a typed input (the schema's `Encoded` type) against a schema,

Callers 1

Schema.test.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected