File: commaOperatorWithSecondOperandStringType.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 (182 lines) | stat: -rw-r--r-- 3,990 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
180
181
182
=== tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandStringType.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

var resultIsString: string;
>resultIsString : string

//The second operand is string
ANY, STRING;
>ANY, STRING : string
>ANY : any
>STRING : string

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

NUMBER, STRING;
>NUMBER, STRING : string
>NUMBER : number
>STRING : string

STRING, STRING;
>STRING, STRING : string
>STRING : string
>STRING : string

OBJECT, STRING;
>OBJECT, STRING : string
>OBJECT : Object
>STRING : string

//Return type is string
var resultIsString1 = (ANY, STRING);
>resultIsString1 : string
>(ANY, STRING) : string
>ANY, STRING : string
>ANY : any
>STRING : string

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

var resultIsString3 = (NUMBER, STRING);
>resultIsString3 : string
>(NUMBER, STRING) : string
>NUMBER, STRING : string
>NUMBER : number
>STRING : string

var resultIsString4 = (STRING, STRING);
>resultIsString4 : string
>(STRING, STRING) : string
>STRING, STRING : string
>STRING : string
>STRING : string

var resultIsString5 = (OBJECT, STRING);
>resultIsString5 : string
>(OBJECT, STRING) : string
>OBJECT, STRING : string
>OBJECT : Object
>STRING : string

//Literal and expression
null, STRING;
>null, STRING : string
>null : null
>STRING : string

ANY = new Date(), STRING;
>ANY = new Date(), STRING : string
>ANY = new Date() : Date
>ANY : any
>new Date() : Date
>Date : DateConstructor
>STRING : string

true, "";
>true, "" : ""
>true : true
>"" : ""

BOOLEAN == undefined, "";
>BOOLEAN == undefined, "" : ""
>BOOLEAN == undefined : boolean
>BOOLEAN : boolean
>undefined : undefined
>"" : ""

["a", "b"], NUMBER.toString();
>["a", "b"], NUMBER.toString() : string
>["a", "b"] : string[]
>"a" : "a"
>"b" : "b"
>NUMBER.toString() : string
>NUMBER.toString : (radix?: number) => string
>NUMBER : number
>toString : (radix?: number) => string

OBJECT = new Object, STRING + "string";
>OBJECT = new Object, STRING + "string" : string
>OBJECT = new Object : Object
>OBJECT : Object
>new Object : Object
>Object : ObjectConstructor
>STRING + "string" : string
>STRING : string
>"string" : "string"

var resultIsString6 = (null, STRING);
>resultIsString6 : string
>(null, STRING) : string
>null, STRING : string
>null : null
>STRING : string

var resultIsString7 = (ANY = new Date(), STRING);
>resultIsString7 : string
>(ANY = new Date(), STRING) : string
>ANY = new Date(), STRING : string
>ANY = new Date() : Date
>ANY : any
>new Date() : Date
>Date : DateConstructor
>STRING : string

var resultIsString8 = (true, "");
>resultIsString8 : string
>(true, "") : ""
>true, "" : ""
>true : true
>"" : ""

var resultIsString9 = (BOOLEAN == undefined, "");
>resultIsString9 : string
>(BOOLEAN == undefined, "") : ""
>BOOLEAN == undefined, "" : ""
>BOOLEAN == undefined : boolean
>BOOLEAN : boolean
>undefined : undefined
>"" : ""

var resultIsString10 = (["a", "b"], NUMBER.toString());
>resultIsString10 : string
>(["a", "b"], NUMBER.toString()) : string
>["a", "b"], NUMBER.toString() : string
>["a", "b"] : string[]
>"a" : "a"
>"b" : "b"
>NUMBER.toString() : string
>NUMBER.toString : (radix?: number) => string
>NUMBER : number
>toString : (radix?: number) => string

var resultIsString11 = (new Object, STRING + "string");
>resultIsString11 : string
>(new Object, STRING + "string") : string
>new Object, STRING + "string" : string
>new Object : Object
>Object : ObjectConstructor
>STRING + "string" : string
>STRING : string
>"string" : "string"