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

Function step

packages/effect/src/SchemaAST.ts:1848–1870  ·  view source on GitHub ↗
(s, item, exit, i)

Source from the content-addressed store, hash-verified

1846 return s.getParser(s.tailThreshold, i).parser(value, s.options)
1847 },
1848 step(s, item, exit, i) {
1849 if (exit._tag === "Failure") {
1850 return wrapPropertyKeyIssue(s, s.ast, i, exit)
1851 }
1852 const value = exit === InternalParser.sameExit
1853 ? item
1854 : (exit as InternalParser.Success<unknown, SchemaIssue.Issue>)[InternalParser.args]
1855 if (value !== InternalParser.missing) {
1856 s.output[i] = value
1857 } else {
1858 const p = s.getParser(s.tailThreshold, i)
1859 if (isOptional(p.ast)) return
1860 const issue = new SchemaIssue.Pointer([i], new SchemaIssue.MissingKey(p.ast.context?.annotations))
1861 if (s.options.errors === "all") {
1862 if (s.issues) s.issues.push(issue)
1863 else s.issues = [issue]
1864 } else {
1865 return Exit.fail(
1866 new SchemaIssue.Composite(s.ast, [issue], s.input, s.options)
1867 )
1868 }
1869 }
1870 }
1871})
1872
1873const resolveConcurrency = (value: number | "unbounded" | undefined) => {

Callers

nothing calls this directly

Calls 5

wrapPropertyKeyIssueFunction · 0.85
isOptionalFunction · 0.85
pushMethod · 0.80
getParserMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected