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

Function makeSync

packages/effect/src/SchemaParser.ts:1059–1066  ·  view source on GitHub ↗
(
  ast: SchemaAST.AST,
  options?: SchemaAST.ParseOptions
)

Source from the content-addressed store, hash-verified

1057}
1058
1059function makeSync<T>(
1060 ast: SchemaAST.AST,
1061 options?: SchemaAST.ParseOptions
1062): (input: unknown, options?: SchemaAST.ParseOptions) => T {
1063 let run: ((input: unknown, options?: SchemaAST.ParseOptions) => T) | undefined
1064 return (input, overrideOptions) =>
1065 (run ??= makeSyncEntry<T>(CompilerRegistry.resolve(ast), options))(input, overrideOptions)
1066}
1067
1068function makeSyncEntry<T>(
1069 entry: CompilerRegistry.Entry,

Callers 2

decodeUnknownSyncFunction · 0.70
encodeUnknownSyncFunction · 0.70

Calls 2

makeSyncEntryFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected