* 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
82 lines
1.2 KiB
Plaintext
82 lines
1.2 KiB
Plaintext
=== tests/cases/compiler/augmentedTypesVar.ts ===
|
|
// var then var
|
|
var x1 = 1;
|
|
>x1 : number
|
|
>1 : 1
|
|
|
|
var x1 = 2;
|
|
>x1 : number
|
|
>2 : 2
|
|
|
|
// var then function
|
|
var x2 = 1; // error
|
|
>x2 : number
|
|
>1 : 1
|
|
|
|
function x2() { } // error
|
|
>x2 : () => void
|
|
|
|
var x3 = 1;
|
|
>x3 : number
|
|
>1 : 1
|
|
|
|
var x3 = () => { } // error
|
|
>x3 : number
|
|
>() => { } : () => void
|
|
|
|
// var then class
|
|
var x4 = 1; // error
|
|
>x4 : number
|
|
>1 : 1
|
|
|
|
class x4 { } // error
|
|
>x4 : x4
|
|
|
|
var x4a = 1; // error
|
|
>x4a : number
|
|
>1 : 1
|
|
|
|
class x4a { public foo() { } } // error
|
|
>x4a : x4a
|
|
>foo : () => void
|
|
|
|
// var then enum
|
|
var x5 = 1;
|
|
>x5 : number
|
|
>1 : 1
|
|
|
|
enum x5 { One } // error
|
|
>x5 : x5
|
|
>One : x5
|
|
|
|
// var then module
|
|
var x6 = 1;
|
|
>x6 : number
|
|
>1 : 1
|
|
|
|
module x6 { } // ok since non-instantiated
|
|
>x6 : number
|
|
|
|
var x6a = 1; // error
|
|
>x6a : number
|
|
>1 : 1
|
|
|
|
module x6a { var y = 2; } // error since instantiated
|
|
>x6a : typeof x6a
|
|
>y : number
|
|
>2 : 2
|
|
|
|
var x6b = 1; // error
|
|
>x6b : number
|
|
>1 : 1
|
|
|
|
module x6b { export var y = 2; } // error
|
|
>x6b : typeof x6b
|
|
>y : number
|
|
>2 : 2
|
|
|
|
// var then import, messes with other error reporting
|
|
//var x7 = 1;
|
|
//import x7 = require('');
|
|
|