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
|
=== tests/cases/compiler/operatorAddNullUndefined.ts ===
enum E { x }
>E : E
>x : E.x
var x1 = null + null;
>x1 : any
>null + null : any
>null : null
>null : null
var x2 = null + undefined;
>x2 : any
>null + undefined : any
>null : null
>undefined : undefined
var x3 = undefined + null;
>x3 : any
>undefined + null : any
>undefined : undefined
>null : null
var x4 = undefined + undefined;
>x4 : any
>undefined + undefined : any
>undefined : undefined
>undefined : undefined
var x5 = 1 + null;
>x5 : any
>1 + null : any
>1 : 1
>null : null
var x6 = 1 + undefined;
>x6 : any
>1 + undefined : any
>1 : 1
>undefined : undefined
var x7 = null + 1;
>x7 : any
>null + 1 : any
>null : null
>1 : 1
var x8 = undefined + 1;
>x8 : any
>undefined + 1 : any
>undefined : undefined
>1 : 1
var x9 = "test" + null;
>x9 : string
>"test" + null : string
>"test" : "test"
>null : null
var x10 = "test" + undefined;
>x10 : string
>"test" + undefined : string
>"test" : "test"
>undefined : undefined
var x11 = null + "test";
>x11 : string
>null + "test" : string
>null : null
>"test" : "test"
var x12 = undefined + "test";
>x12 : string
>undefined + "test" : string
>undefined : undefined
>"test" : "test"
var x13 = null + E.x
>x13 : any
>null + E.x : any
>null : null
>E.x : E
>E : typeof E
>x : E
var x14 = undefined + E.x
>x14 : any
>undefined + E.x : any
>undefined : undefined
>E.x : E
>E : typeof E
>x : E
var x15 = E.x + null
>x15 : any
>E.x + null : any
>E.x : E
>E : typeof E
>x : E
>null : null
var x16 = E.x + undefined
>x16 : any
>E.x + undefined : any
>E.x : E
>E : typeof E
>x : E
>undefined : undefined
|