* Always generate type & symbol baselines * Accept changed shadowed baselines * Accept brand new type and symbol baselines * Allow `getTypeAtLocation` to return undefined in the type writer * Accept baselines which had missing type information * Bind container for dynamically names enum members so they may be printed * Accept type/symbol baselines for enums with computed members * First pass at reducing typeWriter memory overhead * Use generators to allow for type and symbol baselines with no cache * Accept new baselines for tests whose output was fixed by better newline splitting * Hard cap on number of declarations printed, cache declaration print text * handle differing newlines better still to handle RWC newlines * Lower abridging count, accept abridged baselines * Limit max RWC error output size, limit RWC type and symbol baseline input size * Move skip logic into type and symbol baseliner to streamline error handling * Accept removal of empty baselines * Canonicalize path earlier to handle odd paths in input files * Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another * No need to pathify again
113 lines
1.5 KiB
Text
113 lines
1.5 KiB
Text
=== tests/cases/conformance/expressions/literals/literals.ts ===
|
|
//typeof null is Null
|
|
//typeof true is Boolean
|
|
//typeof false is Boolean
|
|
//typeof numeric literal is Number
|
|
//typeof string literal is String
|
|
//typeof regex literal is Regex
|
|
|
|
var nu = null / null;
|
|
>nu : number
|
|
>null / null : number
|
|
>null : null
|
|
>null : null
|
|
|
|
var u = undefined / undefined;
|
|
>u : number
|
|
>undefined / undefined : number
|
|
>undefined : undefined
|
|
>undefined : undefined
|
|
|
|
var b: boolean;
|
|
>b : boolean
|
|
|
|
var b = true;
|
|
>b : boolean
|
|
>true : true
|
|
|
|
var b = false;
|
|
>b : boolean
|
|
>false : false
|
|
|
|
var n: number;
|
|
>n : number
|
|
|
|
var n = 1;
|
|
>n : number
|
|
>1 : 1
|
|
|
|
var n = 1.0;
|
|
>n : number
|
|
>1.0 : 1
|
|
|
|
var n = 1e4;
|
|
>n : number
|
|
>1e4 : 10000
|
|
|
|
var n = 001; // Error in ES5
|
|
>n : number
|
|
>001 : 1
|
|
|
|
var n = 0x1;
|
|
>n : number
|
|
>0x1 : 1
|
|
|
|
var n = -1;
|
|
>n : number
|
|
>-1 : -1
|
|
>1 : 1
|
|
|
|
var n = -1.0;
|
|
>n : number
|
|
>-1.0 : -1
|
|
>1.0 : 1
|
|
|
|
var n = -1e-4;
|
|
>n : number
|
|
>-1e-4 : -0.0001
|
|
>1e-4 : 0.0001
|
|
|
|
var n = -003; // Error in ES5
|
|
>n : number
|
|
>-003 : -3
|
|
>003 : 3
|
|
|
|
var n = -0x1;
|
|
>n : number
|
|
>-0x1 : -1
|
|
>0x1 : 1
|
|
|
|
var s: string;
|
|
>s : string
|
|
|
|
var s = '';
|
|
>s : string
|
|
>'' : ""
|
|
|
|
var s = "";
|
|
>s : string
|
|
>"" : ""
|
|
|
|
var s = 'foo\
|
|
>s : string
|
|
>'foo\ bar' : "foo bar"
|
|
|
|
bar';
|
|
var s = "foo\
|
|
>s : string
|
|
>"foo\ bar" : "foo bar"
|
|
|
|
bar";
|
|
|
|
var r: RegExp;
|
|
>r : RegExp
|
|
>RegExp : RegExp
|
|
|
|
var r = /what/;
|
|
>r : RegExp
|
|
>/what/ : RegExp
|
|
|
|
var r = /\\\\/;
|
|
>r : RegExp
|
|
>/\\\\/ : RegExp
|
|
|