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

Method parseStringIndex

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

Source from the content-addressed store, hash-verified

3005 : Effect.flatMap(Effect.exit(result), (exit) => finishIndex(s, key, k2, inputValue, exit))
3006 }
3007 const parseStringIndex = (
3008 s: ObjectParserState,
3009 key: PropertyKey,
3010 index: Index
3011 ): Effect.Effect<void, SchemaIssue.Issue, any> => {
3012 const inputValue = s.input[key]
3013 const result = index.parserValue(inputValue, s.options)
3014 return effectIsExit(result)
3015 ? finishIndex(s, key, key, inputValue, result)
3016 : Effect.flatMap(Effect.exit(result), (exit) => finishIndex(s, key, key, inputValue, exit))
3017 }
3018 const parseIndexes = indexCount
3019 ? iterateConcurrent<ObjectParserState, readonly [key: PropertyKey, index: Index]>()({
3020 onItem: (s, [key, index]) =>

Callers

nothing calls this directly

Calls 2

effectIsExitFunction · 0.90
exitMethod · 0.80

Tested by

no test coverage detected