File: sourceMapValidationDestructuringVariableStatement1.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (145 lines) | stat: -rw-r--r-- 3,329 bytes parent folder | download | duplicates (5)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts ===
interface Robot {
    name: string;
>name : string

    skill: string;
>skill : string
}
declare var console: {
>console : { log(msg: string): void; }

    log(msg: string): void;
>log : (msg: string) => void
>msg : string
}
var hello = "hello";
>hello : string
>"hello" : "hello"

var robotA: Robot = { name: "mower", skill: "mowing" };
>robotA : Robot
>{ name: "mower", skill: "mowing" } : { name: string; skill: string; }
>name : string
>"mower" : "mower"
>skill : string
>"mowing" : "mowing"

var robotB: Robot = { name: "trimmer", skill: "trimming" };
>robotB : Robot
>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; }
>name : string
>"trimmer" : "trimmer"
>skill : string
>"trimming" : "trimming"

var a: string, { name: nameA } = robotA;
>a : string
>name : any
>nameA : string
>robotA : Robot

var b: string, { name: nameB, skill: skillB } = robotB;
>b : string
>name : any
>nameB : string
>skill : any
>skillB : string
>robotB : Robot

var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
>c : string
>name : any
>nameC : string
>skill : any
>skillC : string
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
>name : string
>"Edger" : "Edger"
>skill : string
>"cutting edges" : "cutting edges"

var { name: nameA } = robotA, a = hello;
>name : any
>nameA : string
>robotA : Robot
>a : string
>hello : string

var { name: nameB, skill: skillB } = robotB, b = " hello";
>name : any
>nameB : string
>skill : any
>skillB : string
>robotB : Robot
>b : string
>" hello" : " hello"

var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello;
>name : any
>nameC : string
>skill : any
>skillC : string
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
>name : string
>"Edger" : "Edger"
>skill : string
>"cutting edges" : "cutting edges"
>c : string
>hello : string

var a = hello, { name: nameA } = robotA, a1= "hello";
>a : string
>hello : string
>name : any
>nameA : string
>robotA : Robot
>a1 : string
>"hello" : "hello"

var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
>b : string
>hello : string
>name : any
>nameB : string
>skill : any
>skillB : string
>robotB : Robot
>b1 : string
>"hello" : "hello"

var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
>c : string
>hello : string
>name : any
>nameC : string
>skill : any
>skillC : string
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
>name : string
>"Edger" : "Edger"
>skill : string
>"cutting edges" : "cutting edges"
>c1 : string
>hello : string

if (nameA == nameB) {
>nameA == nameB : boolean
>nameA : string
>nameB : string

    console.log(skillB);
>console.log(skillB) : void
>console.log : (msg: string) => void
>console : { log(msg: string): void; }
>log : (msg: string) => void
>skillB : string
}
else {
    console.log(nameC);
>console.log(nameC) : void
>console.log : (msg: string) => void
>console : { log(msg: string): void; }
>log : (msg: string) => void
>nameC : string
}