File: commaOperatorWithSecondOperandBooleanType.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 (179 lines) | stat: -rw-r--r-- 3,682 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
=== tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandBooleanType.ts ===
var ANY: any;
>ANY : any

var BOOLEAN: boolean;
>BOOLEAN : boolean

var NUMBER: number;
>NUMBER : number

var STRING: string;
>STRING : string

var OBJECT: Object;
>OBJECT : Object

//The second operand type is boolean
ANY, BOOLEAN;
>ANY, BOOLEAN : boolean
>ANY : any
>BOOLEAN : boolean

BOOLEAN, BOOLEAN;
>BOOLEAN, BOOLEAN : boolean
>BOOLEAN : boolean
>BOOLEAN : boolean

NUMBER, BOOLEAN;
>NUMBER, BOOLEAN : boolean
>NUMBER : number
>BOOLEAN : boolean

STRING, BOOLEAN;
>STRING, BOOLEAN : boolean
>STRING : string
>BOOLEAN : boolean

OBJECT, BOOLEAN;
>OBJECT, BOOLEAN : boolean
>OBJECT : Object
>BOOLEAN : boolean

//Return type is boolean
var resultIsBoolean1 = (ANY, BOOLEAN);
>resultIsBoolean1 : boolean
>(ANY, BOOLEAN) : boolean
>ANY, BOOLEAN : boolean
>ANY : any
>BOOLEAN : boolean

var resultIsBoolean2 = (BOOLEAN, BOOLEAN);
>resultIsBoolean2 : boolean
>(BOOLEAN, BOOLEAN) : boolean
>BOOLEAN, BOOLEAN : boolean
>BOOLEAN : boolean
>BOOLEAN : boolean

var resultIsBoolean3 = (NUMBER, BOOLEAN);
>resultIsBoolean3 : boolean
>(NUMBER, BOOLEAN) : boolean
>NUMBER, BOOLEAN : boolean
>NUMBER : number
>BOOLEAN : boolean

var resultIsBoolean4 = (STRING, BOOLEAN);
>resultIsBoolean4 : boolean
>(STRING, BOOLEAN) : boolean
>STRING, BOOLEAN : boolean
>STRING : string
>BOOLEAN : boolean

var resultIsBoolean5 = (OBJECT, BOOLEAN);
>resultIsBoolean5 : boolean
>(OBJECT, BOOLEAN) : boolean
>OBJECT, BOOLEAN : boolean
>OBJECT : Object
>BOOLEAN : boolean

//Literal and expression
null, BOOLEAN;
>null, BOOLEAN : boolean
>null : null
>BOOLEAN : boolean

ANY = undefined, BOOLEAN;
>ANY = undefined, BOOLEAN : boolean
>ANY = undefined : undefined
>ANY : any
>undefined : undefined
>BOOLEAN : boolean

1, true;
>1, true : true
>1 : 1
>true : true

++NUMBER, true;
>++NUMBER, true : true
>++NUMBER : number
>NUMBER : number
>true : true

[1, 2, 3], !BOOLEAN;
>[1, 2, 3], !BOOLEAN : boolean
>[1, 2, 3] : number[]
>1 : 1
>2 : 2
>3 : 3
>!BOOLEAN : boolean
>BOOLEAN : boolean

OBJECT = [1, 2, 3], BOOLEAN = false;
>OBJECT = [1, 2, 3], BOOLEAN = false : false
>OBJECT = [1, 2, 3] : number[]
>OBJECT : Object
>[1, 2, 3] : number[]
>1 : 1
>2 : 2
>3 : 3
>BOOLEAN = false : false
>BOOLEAN : boolean
>false : false

var resultIsBoolean6 = (null, BOOLEAN);
>resultIsBoolean6 : boolean
>(null, BOOLEAN) : false
>null, BOOLEAN : false
>null : null
>BOOLEAN : false

var resultIsBoolean7 = (ANY = undefined, BOOLEAN);
>resultIsBoolean7 : boolean
>(ANY = undefined, BOOLEAN) : false
>ANY = undefined, BOOLEAN : false
>ANY = undefined : undefined
>ANY : any
>undefined : undefined
>BOOLEAN : false

var resultIsBoolean8 = (1, true);
>resultIsBoolean8 : boolean
>(1, true) : true
>1, true : true
>1 : 1
>true : true

var resultIsBoolean9 = (++NUMBER, true);
>resultIsBoolean9 : boolean
>(++NUMBER, true) : true
>++NUMBER, true : true
>++NUMBER : number
>NUMBER : number
>true : true

var resultIsBoolean10 = ([1, 2, 3], !BOOLEAN);
>resultIsBoolean10 : boolean
>([1, 2, 3], !BOOLEAN) : true
>[1, 2, 3], !BOOLEAN : true
>[1, 2, 3] : number[]
>1 : 1
>2 : 2
>3 : 3
>!BOOLEAN : true
>BOOLEAN : false

var resultIsBoolean11 = (OBJECT = [1, 2, 3], BOOLEAN = false);
>resultIsBoolean11 : boolean
>(OBJECT = [1, 2, 3], BOOLEAN = false) : false
>OBJECT = [1, 2, 3], BOOLEAN = false : false
>OBJECT = [1, 2, 3] : number[]
>OBJECT : Object
>[1, 2, 3] : number[]
>1 : 1
>2 : 2
>3 : 3
>BOOLEAN = false : false
>BOOLEAN : boolean
>false : false