2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandNumberType.ts ===
|
|
|
|
var ANY: any;
|
2015-04-13 22:54:22 +02:00
|
|
|
>ANY : any, Symbol(ANY,Decl(commaOperatorWithSecondOperandNumberType.ts,0,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var BOOLEAN: boolean;
|
2015-04-13 22:54:22 +02:00
|
|
|
>BOOLEAN : boolean, Symbol(BOOLEAN,Decl(commaOperatorWithSecondOperandNumberType.ts,1,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var NUMBER: number;
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var STRING: string;
|
2015-04-13 22:54:22 +02:00
|
|
|
>STRING : string, Symbol(STRING,Decl(commaOperatorWithSecondOperandNumberType.ts,3,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var OBJECT: Object;
|
2015-04-13 22:54:22 +02:00
|
|
|
>OBJECT : Object, Symbol(OBJECT,Decl(commaOperatorWithSecondOperandNumberType.ts,4,3))
|
|
|
|
>Object : Object, Symbol(Object,Decl(lib.d.ts,92,1),Decl(lib.d.ts,223,11))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
//The second operand type is number
|
|
|
|
ANY, NUMBER;
|
|
|
|
>ANY, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>ANY : any, Symbol(ANY,Decl(commaOperatorWithSecondOperandNumberType.ts,0,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
BOOLEAN, NUMBER;
|
|
|
|
>BOOLEAN, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>BOOLEAN : boolean, Symbol(BOOLEAN,Decl(commaOperatorWithSecondOperandNumberType.ts,1,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
NUMBER, NUMBER;
|
|
|
|
>NUMBER, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
STRING, NUMBER;
|
|
|
|
>STRING, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>STRING : string, Symbol(STRING,Decl(commaOperatorWithSecondOperandNumberType.ts,3,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
OBJECT, NUMBER;
|
|
|
|
>OBJECT, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>OBJECT : Object, Symbol(OBJECT,Decl(commaOperatorWithSecondOperandNumberType.ts,4,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
//Return type is number
|
|
|
|
var resultIsNumber1 = (ANY, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber1 : number, Symbol(resultIsNumber1,Decl(commaOperatorWithSecondOperandNumberType.ts,14,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(ANY, NUMBER) : number
|
|
|
|
>ANY, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>ANY : any, Symbol(ANY,Decl(commaOperatorWithSecondOperandNumberType.ts,0,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber2 = (BOOLEAN, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber2 : number, Symbol(resultIsNumber2,Decl(commaOperatorWithSecondOperandNumberType.ts,15,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(BOOLEAN, NUMBER) : number
|
|
|
|
>BOOLEAN, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>BOOLEAN : boolean, Symbol(BOOLEAN,Decl(commaOperatorWithSecondOperandNumberType.ts,1,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber3 = (NUMBER, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber3 : number, Symbol(resultIsNumber3,Decl(commaOperatorWithSecondOperandNumberType.ts,16,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(NUMBER, NUMBER) : number
|
|
|
|
>NUMBER, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber4 = (STRING, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber4 : number, Symbol(resultIsNumber4,Decl(commaOperatorWithSecondOperandNumberType.ts,17,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(STRING, NUMBER) : number
|
|
|
|
>STRING, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>STRING : string, Symbol(STRING,Decl(commaOperatorWithSecondOperandNumberType.ts,3,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber5 = (OBJECT, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber5 : number, Symbol(resultIsNumber5,Decl(commaOperatorWithSecondOperandNumberType.ts,18,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(OBJECT, NUMBER) : number
|
|
|
|
>OBJECT, NUMBER : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>OBJECT : Object, Symbol(OBJECT,Decl(commaOperatorWithSecondOperandNumberType.ts,4,3))
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
//Literal and expression
|
|
|
|
null, NUMBER;
|
|
|
|
>null, NUMBER : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
ANY = undefined, NUMBER;
|
|
|
|
>ANY = undefined, NUMBER : number
|
|
|
|
>ANY = undefined : undefined
|
2015-04-13 22:54:22 +02:00
|
|
|
>ANY : any, Symbol(ANY,Decl(commaOperatorWithSecondOperandNumberType.ts,0,3))
|
|
|
|
>undefined : undefined, Symbol(undefined)
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
true, 1;
|
|
|
|
>true, 1 : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>true : boolean
|
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
BOOLEAN = false, 1;
|
|
|
|
>BOOLEAN = false, 1 : number
|
|
|
|
>BOOLEAN = false : boolean
|
2015-04-13 22:54:22 +02:00
|
|
|
>BOOLEAN : boolean, Symbol(BOOLEAN,Decl(commaOperatorWithSecondOperandNumberType.ts,1,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
"", NUMBER = 1;
|
|
|
|
>"", NUMBER = 1 : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>"" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
>NUMBER = 1 : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
STRING.trim(), NUMBER = 1;
|
|
|
|
>STRING.trim(), NUMBER = 1 : number
|
|
|
|
>STRING.trim() : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>STRING.trim : () => string, Symbol(String.trim,Decl(lib.d.ts,411,32))
|
|
|
|
>STRING : string, Symbol(STRING,Decl(commaOperatorWithSecondOperandNumberType.ts,3,3))
|
|
|
|
>trim : () => string, Symbol(String.trim,Decl(lib.d.ts,411,32))
|
2014-08-15 23:33:16 +02:00
|
|
|
>NUMBER = 1 : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber6 = (null, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber6 : number, Symbol(resultIsNumber6,Decl(commaOperatorWithSecondOperandNumberType.ts,28,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(null, NUMBER) : number
|
|
|
|
>null, NUMBER : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber7 = (ANY = undefined, NUMBER);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber7 : number, Symbol(resultIsNumber7,Decl(commaOperatorWithSecondOperandNumberType.ts,29,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(ANY = undefined, NUMBER) : number
|
|
|
|
>ANY = undefined, NUMBER : number
|
|
|
|
>ANY = undefined : undefined
|
2015-04-13 22:54:22 +02:00
|
|
|
>ANY : any, Symbol(ANY,Decl(commaOperatorWithSecondOperandNumberType.ts,0,3))
|
|
|
|
>undefined : undefined, Symbol(undefined)
|
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber8 = (true, 1);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber8 : number, Symbol(resultIsNumber8,Decl(commaOperatorWithSecondOperandNumberType.ts,30,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(true, 1) : number
|
|
|
|
>true, 1 : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>true : boolean
|
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber9 = (BOOLEAN = false, 1);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber9 : number, Symbol(resultIsNumber9,Decl(commaOperatorWithSecondOperandNumberType.ts,31,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(BOOLEAN = false, 1) : number
|
|
|
|
>BOOLEAN = false, 1 : number
|
|
|
|
>BOOLEAN = false : boolean
|
2015-04-13 22:54:22 +02:00
|
|
|
>BOOLEAN : boolean, Symbol(BOOLEAN,Decl(commaOperatorWithSecondOperandNumberType.ts,1,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber10 = ("", NUMBER = 1);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber10 : number, Symbol(resultIsNumber10,Decl(commaOperatorWithSecondOperandNumberType.ts,32,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>("", NUMBER = 1) : number
|
|
|
|
>"", NUMBER = 1 : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>"" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
>NUMBER = 1 : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var resultIsNumber11 = (STRING.trim(), NUMBER = 1);
|
2015-04-13 22:54:22 +02:00
|
|
|
>resultIsNumber11 : number, Symbol(resultIsNumber11,Decl(commaOperatorWithSecondOperandNumberType.ts,33,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>(STRING.trim(), NUMBER = 1) : number
|
|
|
|
>STRING.trim(), NUMBER = 1 : number
|
|
|
|
>STRING.trim() : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>STRING.trim : () => string, Symbol(String.trim,Decl(lib.d.ts,411,32))
|
|
|
|
>STRING : string, Symbol(STRING,Decl(commaOperatorWithSecondOperandNumberType.ts,3,3))
|
|
|
|
>trim : () => string, Symbol(String.trim,Decl(lib.d.ts,411,32))
|
2014-08-15 23:33:16 +02:00
|
|
|
>NUMBER = 1 : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>NUMBER : number, Symbol(NUMBER,Decl(commaOperatorWithSecondOperandNumberType.ts,2,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|