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

Function runWithCompiler

packages/effect/src/SchemaParser.ts:994–999  ·  view source on GitHub ↗
(compiler: Compiler, ast: SchemaAST.AST)

Source from the content-addressed store, hash-verified

992}
993
994function runWithCompiler<T, R>(compiler: Compiler, ast: SchemaAST.AST) {
995 let parser: Parser
996 return (input: unknown, options?: SchemaAST.ParseOptions): Effect.Effect<T, SchemaIssue.Issue, R> => {
997 return parserResult<T, R>((parser ??= compiler(ast))(input, options ?? SchemaAST.defaultParseOptions), input)
998 }
999}
1000
1001function asPromise<T, E>(
1002 parser: (input: E, options?: SchemaAST.ParseOptions) => Effect.Effect<T, SchemaIssue.Issue>

Callers 2

runFunction · 0.85
makeDetailedSyncFunction · 0.85

Calls 2

parserResultFunction · 0.85
compilerFunction · 0.50

Tested by

no test coverage detected