( write: WritesValues, held: readonly Checker[], withCtx?: 1, // 1 where it writes an array's elements, which an empty one has none of elements?: 1 )
| 1275 | } |
| 1276 | |
| 1277 | const failingValues = ( |
| 1278 | write: WritesValues, |
| 1279 | held: readonly Checker[], |
| 1280 | withCtx?: 1, |
| 1281 | // 1 where it writes an array's elements, which an empty one has none of |
| 1282 | elements?: 1 |
| 1283 | ): Transform => |
| 1284 | readingValues( |
| 1285 | (data, ctx) => { |
| 1286 | if (elements && !data.length) return data |
| 1287 | const values = writtenFor(ctx) |
| 1288 | try { |
| 1289 | return values.resolved(data, write(data, values)) |
| 1290 | } finally { |
| 1291 | freed(values) |
| 1292 | } |
| 1293 | }, |
| 1294 | held, |
| 1295 | withCtx |
| 1296 | ) |
| 1297 | |
| 1298 | // only transforming a value Apply finds valid finds its morphs' errors |
| 1299 | const applyMorphAt: ApplyAt = (ctx, checker, value, k) => { |
no test coverage detected