|
| 1 | +//// [tests/cases/compiler/capturedShorthandPropertyAssignmentNoCheck.ts] //// |
| 2 | + |
| 3 | +=== capturedShorthandPropertyAssignmentNoCheck.ts === |
| 4 | +const fns = []; |
| 5 | +>fns : Symbol(fns, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 0, 5)) |
| 6 | + |
| 7 | +for (const value of [1, 2, 3]) { |
| 8 | +>value : Symbol(value, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 1, 10)) |
| 9 | + |
| 10 | + fns.push(() => ({ value })); |
| 11 | +>fns.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) |
| 12 | +>fns : Symbol(fns, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 0, 5)) |
| 13 | +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) |
| 14 | +>value : Symbol(value, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 2, 21)) |
| 15 | +} |
| 16 | +const result = fns.map(fn => fn()); |
| 17 | +>result : Symbol(result, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 4, 5)) |
| 18 | +>fns.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) |
| 19 | +>fns : Symbol(fns, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 0, 5)) |
| 20 | +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) |
| 21 | +>fn : Symbol(fn, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 4, 23)) |
| 22 | +>fn : Symbol(fn, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 4, 23)) |
| 23 | + |
| 24 | +console.log(result) |
| 25 | +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) |
| 26 | +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) |
| 27 | +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) |
| 28 | +>result : Symbol(result, Decl(capturedShorthandPropertyAssignmentNoCheck.ts, 4, 5)) |
| 29 | + |
0 commit comments