File: declarationEmitDestructuringArrayPattern1.symbols

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
=== tests/cases/compiler/declarationEmitDestructuringArrayPattern1.ts ===

var [] = [1, "hello"]; // Dont emit anything
var [x] = [1, "hello"]; // emit x: number
>x : Symbol(x, Decl(declarationEmitDestructuringArrayPattern1.ts, 2, 5))

var [x1, y1] = [1, "hello"]; // emit x1: number, y1: string
>x1 : Symbol(x1, Decl(declarationEmitDestructuringArrayPattern1.ts, 3, 5))
>y1 : Symbol(y1, Decl(declarationEmitDestructuringArrayPattern1.ts, 3, 8))

var [, , z1] = [0, 1, 2]; // emit z1: number
>z1 : Symbol(z1, Decl(declarationEmitDestructuringArrayPattern1.ts, 4, 8))

var a = [1, "hello"];
>a : Symbol(a, Decl(declarationEmitDestructuringArrayPattern1.ts, 6, 3))

var [x2] = a;          // emit x2: number | string
>x2 : Symbol(x2, Decl(declarationEmitDestructuringArrayPattern1.ts, 7, 5))
>a : Symbol(a, Decl(declarationEmitDestructuringArrayPattern1.ts, 6, 3))

var [x3, y3, z3] = a;  // emit x3, y3, z3 
>x3 : Symbol(x3, Decl(declarationEmitDestructuringArrayPattern1.ts, 8, 5))
>y3 : Symbol(y3, Decl(declarationEmitDestructuringArrayPattern1.ts, 8, 8))
>z3 : Symbol(z3, Decl(declarationEmitDestructuringArrayPattern1.ts, 8, 12))
>a : Symbol(a, Decl(declarationEmitDestructuringArrayPattern1.ts, 6, 3))