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

Function parser

packages/effect/src/SchemaAST.ts:4950–4954  ·  view source on GitHub ↗
(input, options)

Source from the content-addressed store, hash-verified

4948 refinement: (input: unknown) => input is T
4949): SchemaParser.Parser {
4950 const parser: SchemaParser.Parser = (input, options) => {
4951 if (input === InternalParser.missing) return InternalParser.missingExit
4952 if (refinement(input)) return InternalParser.sameExit
4953 return Effect.fail(new SchemaIssue.InvalidType(ast, input, options))
4954 }
4955 refinements.set(parser, refinement)
4956 return parser
4957}

Callers 15

getParserMethod · 0.70
decodeUnknownEffectFunction · 0.70
decodeUnknownExitFunction · 0.70
decodeUnknownResultFunction · 0.70
decodeUnknownPromiseFunction · 0.70
decodeUnknownSyncFunction · 0.70
encodeUnknownEffectFunction · 0.70
encodeUnknownExitFunction · 0.70
encodeUnknownResultFunction · 0.70
encodeUnknownPromiseFunction · 0.70
encodeUnknownSyncFunction · 0.70
isPropertyNamesFunction · 0.70

Calls 2

refinementFunction · 0.85
failMethod · 0.65

Tested by

no test coverage detected