(
s: ObjectParserState,
key: PropertyKey,
index: Index,
exitKey?: Exit.Exit<unknown, SchemaIssue.Issue>
)
| 2164 | return Exit.void |
| 2165 | } |
| 2166 | const parseIndex = ( |
| 2167 | s: ObjectParserState, |
| 2168 | key: PropertyKey, |
| 2169 | index: Index, |
| 2170 | exitKey?: Exit.Exit<unknown, SchemaIssue.Issue> |
| 2171 | ): Effect.Effect<void, SchemaIssue.Issue, any> => { |
| 2172 | if (!exitKey) { |
| 2173 | const eff = index.parserKey(key, s.options) |
| 2174 | if (!effectIsExit(eff)) { |
| 2175 | return Effect.flatMap(Effect.exit(eff), (exit) => parseIndex(s, key, index, exit)) |
| 2176 | } |
| 2177 | exitKey = eff |
| 2178 | } |
| 2179 | if (exitKey._tag === "Failure") { |
| 2180 | return wrapPropertyKeyIssue(s, ast, key, exitKey) ?? Exit.void |
| 2181 | } |
| 2182 | const k2 = exitKey === InternalParser.sameExit |
| 2183 | ? key |
| 2184 | : (exitKey as InternalParser.Success<PropertyKey, SchemaIssue.Issue>)[InternalParser.args] |
| 2185 | const inputValue = s.input[key] |
| 2186 | const result = index.parserValue(inputValue, s.options) |
| 2187 | return effectIsExit(result) |
| 2188 | ? finishIndex(s, key, k2, inputValue, result) |
| 2189 | : Effect.flatMap(Effect.exit(result), (exit) => finishIndex(s, key, k2, inputValue, exit)) |
| 2190 | } |
| 2191 | const parseStringIndex = ( |
| 2192 | s: ObjectParserState, |
| 2193 | key: PropertyKey, |
nothing calls this directly
no test coverage detected