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

Function decodeUnknownSync

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

Source from the content-addressed store, hash-verified

554 * @since 3.10.0
555 */
556export function decodeUnknownSync<S extends Schema.ConstraintDecoder<unknown>>(
557 schema: S,
558 options?: SchemaAST.ParseOptions
559): (input: unknown, options?: SchemaAST.ParseOptions) => S["Type"] {
560 return CompilerRegistry.compilerAdaptersEnabled
561 ? makeSync(schema.ast, options)
562 : asSync(decodeUnknownEffect(schema, options))
563}
564
565/**
566 * Creates a synchronous decoder for input already typed as the schema's `Encoded`

Callers

nothing calls this directly

Calls 3

asSyncFunction · 0.85
makeSyncFunction · 0.70
decodeUnknownEffectFunction · 0.70

Tested by

no test coverage detected