|
| 1 | +=== tests/cases/compiler/iteratorsAndStrictNullChecks.ts === |
| 2 | + |
| 3 | +// for..of |
| 4 | +for (const x of ["a", "b"]) { |
| 5 | +>x : Symbol(x, Decl(iteratorsAndStrictNullChecks.ts, 2, 10)) |
| 6 | + |
| 7 | + x.substring; |
| 8 | +>x.substring : Symbol(String.substring, Decl(lib.es5.d.ts, --, --)) |
| 9 | +>x : Symbol(x, Decl(iteratorsAndStrictNullChecks.ts, 2, 10)) |
| 10 | +>substring : Symbol(String.substring, Decl(lib.es5.d.ts, --, --)) |
| 11 | +} |
| 12 | + |
| 13 | +// Spread |
| 14 | +const xs = [1, 2, 3]; |
| 15 | +>xs : Symbol(xs, Decl(iteratorsAndStrictNullChecks.ts, 7, 5)) |
| 16 | + |
| 17 | +const ys = [4, 5]; |
| 18 | +>ys : Symbol(ys, Decl(iteratorsAndStrictNullChecks.ts, 8, 5)) |
| 19 | + |
| 20 | +xs.push(...ys); |
| 21 | +>xs.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) |
| 22 | +>xs : Symbol(xs, Decl(iteratorsAndStrictNullChecks.ts, 7, 5)) |
| 23 | +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) |
| 24 | +>ys : Symbol(ys, Decl(iteratorsAndStrictNullChecks.ts, 8, 5)) |
| 25 | + |
0 commit comments