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

Function decodeUnknownSync

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

Source from the content-addressed store, hash-verified

1905 * @since 4.0.0
1906 */
1907export function decodeUnknownSync<S extends ConstraintDecoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) {
1908 const parser = decodeUnknownEffect(schema, options)
1909 return (input: unknown, options?: SchemaAST.ParseOptions): S["Type"] => {
1910 return runSchemaErrorSync(parser(input, options))
1911 }
1912}
1913
1914/**
1915 * Decodes a typed input (the schema's `Encoded` type) against a schema

Callers

nothing calls this directly

Calls 2

runSchemaErrorSyncFunction · 0.85
decodeUnknownEffectFunction · 0.70

Tested by

no test coverage detected