( obj: JsonObject, key: string, path: string, )
| 235 | } |
| 236 | |
| 237 | function readArray( |
| 238 | obj: JsonObject, |
| 239 | key: string, |
| 240 | path: string, |
| 241 | ): ReproParseResult<readonly unknown[]> { |
| 242 | const value = obj[key]; |
| 243 | if (!Array.isArray(value)) { |
| 244 | return fail("ZR_REPRO_INVALID_BUNDLE", path, "expected array"); |
| 245 | } |
| 246 | return ok(value); |
| 247 | } |
| 248 | |
| 249 | function readField(obj: JsonObject, key: string): unknown { |
| 250 | return obj[key]; |
no test coverage detected