2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/literals1.ts ===
|
|
|
|
var a = 42;
|
2015-04-13 22:54:22 +02:00
|
|
|
>a : number, Symbol(a,Decl(literals1.ts,0,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>42 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b = 0xFA34;
|
2015-04-13 22:54:22 +02:00
|
|
|
>b : number, Symbol(b,Decl(literals1.ts,1,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0xFA34 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var c = 0.1715;
|
2015-04-13 22:54:22 +02:00
|
|
|
>c : number, Symbol(c,Decl(literals1.ts,2,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0.1715 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var d = 3.14E5;
|
2015-04-13 22:54:22 +02:00
|
|
|
>d : number, Symbol(d,Decl(literals1.ts,3,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>3.14E5 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var e = 8.14e-5;
|
2015-04-13 22:54:22 +02:00
|
|
|
>e : number, Symbol(e,Decl(literals1.ts,4,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>8.14e-5 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var f = true;
|
2015-04-13 22:54:22 +02:00
|
|
|
>f : boolean, Symbol(f,Decl(literals1.ts,6,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>true : boolean
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var g = false;
|
2015-04-13 22:54:22 +02:00
|
|
|
>g : boolean, Symbol(g,Decl(literals1.ts,7,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var h = "";
|
2015-04-13 22:54:22 +02:00
|
|
|
>h : string, Symbol(h,Decl(literals1.ts,9,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var i = "hi";
|
2015-04-13 22:54:22 +02:00
|
|
|
>i : string, Symbol(i,Decl(literals1.ts,10,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"hi" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var j = '';
|
2015-04-13 22:54:22 +02:00
|
|
|
>j : string, Symbol(j,Decl(literals1.ts,11,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var k = 'q\tq';
|
2015-04-13 22:54:22 +02:00
|
|
|
>k : string, Symbol(k,Decl(literals1.ts,12,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'q\tq' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var m = /q/;
|
2015-04-13 22:54:22 +02:00
|
|
|
>m : RegExp, Symbol(m,Decl(literals1.ts,14,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>/q/ : RegExp
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var n = /\d+/g;
|
2015-04-13 22:54:22 +02:00
|
|
|
>n : RegExp, Symbol(n,Decl(literals1.ts,15,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>/\d+/g : RegExp
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var o = /[3-5]+/i;
|
2015-04-13 22:54:22 +02:00
|
|
|
>o : RegExp, Symbol(o,Decl(literals1.ts,16,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>/[3-5]+/i : RegExp
|
2014-08-15 23:33:16 +02:00
|
|
|
|