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

Function decodeUnknownEffect

packages/effect/src/SchemaParser.ts:262–271  ·  view source on GitHub ↗
(
  schema: S,
  options?: SchemaAST.ParseOptions
)

Source from the content-addressed store, hash-verified

260 * @since 4.0.0
261 */
262export function decodeUnknownEffect<S extends Schema.Constraint>(
263 schema: S,
264 options?: SchemaAST.ParseOptions
265): (
266 input: unknown,
267 options?: SchemaAST.ParseOptions
268) => Effect.Effect<S["Type"], SchemaIssue.Issue, S["DecodingServices"]> {
269 const parser = run<S["Type"], S["DecodingServices"]>(schema.ast)
270 return withParseOptions(parser, options)
271}
272
273/**
274 * Creates an effectful decoder for input already typed as the schema's `Encoded`

Callers 5

decodeUnknownPromiseFunction · 0.70
decodeUnknownExitFunction · 0.70
decodeUnknownOptionFunction · 0.70
decodeUnknownResultFunction · 0.70
decodeUnknownSyncFunction · 0.70

Calls 2

withParseOptionsFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected