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

Function encodeUnknownSync

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

Source from the content-addressed store, hash-verified

909 * @since 3.10.0
910 */
911export function encodeUnknownSync<S extends Schema.ConstraintEncoder<unknown>>(
912 schema: S,
913 options?: SchemaAST.ParseOptions
914): (input: unknown, options?: SchemaAST.ParseOptions) => S["Encoded"] {
915 return CompilerRegistry.compilerAdaptersEnabled
916 ? makeSync(SchemaAST.flip(schema.ast), options)
917 : asSync(encodeUnknownEffect(schema, options))
918}
919
920/**
921 * Creates a synchronous encoder for input already typed as the schema's decoded

Callers

nothing calls this directly

Calls 4

asSyncFunction · 0.85
makeSyncFunction · 0.70
encodeUnknownEffectFunction · 0.70
flipMethod · 0.65

Tested by

no test coverage detected