* 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
138 lines
2.1 KiB
Text
138 lines
2.1 KiB
Text
=== tests/cases/compiler/cloduleTest2.ts ===
|
|
module T1 {
|
|
>T1 : typeof T1
|
|
|
|
module m3d { export var y = 2; }
|
|
>m3d : typeof m3d
|
|
>y : number
|
|
>2 : 2
|
|
|
|
declare class m3d { constructor(foo); foo(): void ; static bar(); }
|
|
>m3d : m3d
|
|
>foo : any
|
|
>foo : () => void
|
|
>bar : () => any
|
|
|
|
var r = new m3d(); // error
|
|
>r : any
|
|
>new m3d() : any
|
|
>m3d : typeof m3d
|
|
}
|
|
|
|
module T2 {
|
|
>T2 : typeof T2
|
|
|
|
declare class m3d { constructor(foo); foo(): void; static bar(); }
|
|
>m3d : m3d
|
|
>foo : any
|
|
>foo : () => void
|
|
>bar : () => any
|
|
|
|
module m3d { export var y = 2; }
|
|
>m3d : typeof m3d
|
|
>y : number
|
|
>2 : 2
|
|
|
|
var r = new m3d(); // error
|
|
>r : any
|
|
>new m3d() : any
|
|
>m3d : typeof m3d
|
|
}
|
|
|
|
module T3 {
|
|
>T3 : typeof T3
|
|
|
|
module m3d { export var y = 2; }
|
|
>m3d : typeof m3d
|
|
>y : number
|
|
>2 : 2
|
|
|
|
declare class m3d { foo(): void; static bar(); }
|
|
>m3d : m3d
|
|
>foo : () => void
|
|
>bar : () => any
|
|
|
|
var r = new m3d();
|
|
>r : m3d
|
|
>new m3d() : m3d
|
|
>m3d : typeof m3d
|
|
|
|
r.foo();
|
|
>r.foo() : void
|
|
>r.foo : () => void
|
|
>r : m3d
|
|
>foo : () => void
|
|
|
|
r.bar(); // error
|
|
>r.bar() : any
|
|
>r.bar : any
|
|
>r : m3d
|
|
>bar : any
|
|
|
|
r.y; // error
|
|
>r.y : any
|
|
>r : m3d
|
|
>y : any
|
|
}
|
|
|
|
module T4 {
|
|
>T4 : typeof T4
|
|
|
|
declare class m3d { foo(): void; static bar(); }
|
|
>m3d : m3d
|
|
>foo : () => void
|
|
>bar : () => any
|
|
|
|
module m3d { export var y = 2; }
|
|
>m3d : typeof m3d
|
|
>y : number
|
|
>2 : 2
|
|
|
|
var r = new m3d();
|
|
>r : m3d
|
|
>new m3d() : m3d
|
|
>m3d : typeof m3d
|
|
|
|
r.foo();
|
|
>r.foo() : void
|
|
>r.foo : () => void
|
|
>r : m3d
|
|
>foo : () => void
|
|
|
|
r.bar(); // error
|
|
>r.bar() : any
|
|
>r.bar : any
|
|
>r : m3d
|
|
>bar : any
|
|
|
|
r.y; // error
|
|
>r.y : any
|
|
>r : m3d
|
|
>y : any
|
|
}
|
|
|
|
module m3d { export var y = 2; }
|
|
>m3d : typeof m3d
|
|
>y : number
|
|
>2 : 2
|
|
|
|
declare class m3d { constructor(foo); foo(): void; static bar(); }
|
|
>m3d : m3d
|
|
>foo : any
|
|
>foo : () => void
|
|
>bar : () => any
|
|
|
|
var r = new m3d(); // error
|
|
>r : any
|
|
>new m3d() : any
|
|
>m3d : typeof m3d
|
|
|
|
declare class m4d extends m3d { }
|
|
>m4d : m4d
|
|
>m3d : m3d
|
|
|
|
var r2 = new m4d(); // error
|
|
>r2 : any
|
|
>new m4d() : any
|
|
>m4d : typeof m4d
|
|
|