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

Method parseStringIndex

packages/effect/src/SchemaAST.ts:2191–2201  ·  view source on GitHub ↗
(
      s: ObjectParserState,
      key: PropertyKey,
      index: Index
    )

Source from the content-addressed store, hash-verified

2189 : Effect.flatMap(Effect.exit(result), (exit) => finishIndex(s, key, k2, inputValue, exit))
2190 }
2191 const parseStringIndex = (
2192 s: ObjectParserState,
2193 key: PropertyKey,
2194 index: Index
2195 ): Effect.Effect<void, SchemaIssue.Issue, any> => {
2196 const inputValue = s.input[key]
2197 const result = index.parserValue(inputValue, s.options)
2198 return effectIsExit(result)
2199 ? finishIndex(s, key, key, inputValue, result)
2200 : Effect.flatMap(Effect.exit(result), (exit) => finishIndex(s, key, key, inputValue, exit))
2201 }
2202 const parseIndexes = indexCount ?
2203 iterateEager<ObjectParserState, [key: PropertyKey, index: Index]>()({
2204 onItem: (s, [key, index]) => parseIndex(s, key, index),

Callers

nothing calls this directly

Calls 1

effectIsExitFunction · 0.90

Tested by

no test coverage detected