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

Method getParser

packages/effect/src/SchemaAST.ts:822–834  ·  view source on GitHub ↗

@internal

()

Source from the content-addressed store, hash-verified

820 }
821 /** @internal */
822 getParser(): SchemaParser.Parser {
823 let run: ReturnType<typeof this.run>
824 return (input, options) => {
825 if (input === InternalParser.missing) return InternalParser.missingExit
826 // Keep this declaration's initialization errors outside its callback catch.
827 run ??= this.run(this.typeParameters)
828 try {
829 return run(input, this, options)
830 } catch (error) {
831 return Effect.die(error)
832 }
833 }
834 }
835 /** @internal */
836 recur(recur: (ast: AST) => AST): Declaration {
837 const typeParameters = mapOrSame(this.typeParameters, recur)

Callers

nothing calls this directly

Calls 15

effectIsExitFunction · 0.90
fromConstFunction · 0.85
fromRefinementFunction · 0.85
compileFieldFunction · 0.85
stepPropertyFunction · 0.85
getCandidateIndexFunction · 0.85
failSingleUnionCandidateFunction · 0.85
parseUnionCandidatesFunction · 0.85
runFunction · 0.70
compileFunction · 0.70

Tested by

no test coverage detected