* 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
139 lines
3.5 KiB
Plaintext
139 lines
3.5 KiB
Plaintext
=== tests/cases/compiler/es6ClassTest.ts ===
|
|
class Bar {
|
|
>Bar : Symbol(Bar, Decl(es6ClassTest.ts, 0, 0))
|
|
|
|
public goo: number;
|
|
>goo : Symbol(Bar.goo, Decl(es6ClassTest.ts, 0, 11))
|
|
|
|
public prop1(x) {
|
|
>prop1 : Symbol(Bar.prop1, Decl(es6ClassTest.ts, 1, 23))
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 2, 17))
|
|
|
|
return x;
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 2, 17))
|
|
}
|
|
|
|
constructor (n) { }
|
|
>n : Symbol(n, Decl(es6ClassTest.ts, 6, 17))
|
|
}
|
|
|
|
// new-style class
|
|
class Foo extends Bar {
|
|
>Foo : Symbol(Foo, Decl(es6ClassTest.ts, 7, 1))
|
|
>Bar : Symbol(Bar, Decl(es6ClassTest.ts, 0, 0))
|
|
|
|
foo:number;
|
|
>foo : Symbol(Foo.foo, Decl(es6ClassTest.ts, 10, 24))
|
|
|
|
gar = 0;
|
|
>gar : Symbol(Foo.gar, Decl(es6ClassTest.ts, 11, 12))
|
|
|
|
zoo:string = "zoo";
|
|
>zoo : Symbol(Foo.zoo, Decl(es6ClassTest.ts, 12, 9))
|
|
|
|
x: any;
|
|
>x : Symbol(Foo.x, Decl(es6ClassTest.ts, 13, 20))
|
|
|
|
bar() { return 0; }
|
|
>bar : Symbol(Foo.bar, Decl(es6ClassTest.ts, 14, 8))
|
|
|
|
private boo();
|
|
>boo : Symbol(Foo.boo, Decl(es6ClassTest.ts, 16, 20), Decl(es6ClassTest.ts, 18, 15))
|
|
|
|
private boo(x?) { return x; }
|
|
>boo : Symbol(Foo.boo, Decl(es6ClassTest.ts, 16, 20), Decl(es6ClassTest.ts, 18, 15))
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 19, 13))
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 19, 13))
|
|
|
|
static statVal = 0;
|
|
>statVal : Symbol(Foo.statVal, Decl(es6ClassTest.ts, 19, 30))
|
|
|
|
constructor();
|
|
constructor(x?, private y?:string, public z?=0) {
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 24, 13))
|
|
>y : Symbol(Foo.y, Decl(es6ClassTest.ts, 24, 16))
|
|
>z : Symbol(Foo.z, Decl(es6ClassTest.ts, 24, 35))
|
|
|
|
super(x);
|
|
>super : Symbol(Bar, Decl(es6ClassTest.ts, 0, 0))
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 24, 13))
|
|
|
|
this.x = x;
|
|
>this.x : Symbol(Foo.x, Decl(es6ClassTest.ts, 13, 20))
|
|
>this : Symbol(Foo, Decl(es6ClassTest.ts, 7, 1))
|
|
>x : Symbol(Foo.x, Decl(es6ClassTest.ts, 13, 20))
|
|
>x : Symbol(x, Decl(es6ClassTest.ts, 24, 13))
|
|
|
|
this.gar = 5;
|
|
>this.gar : Symbol(Foo.gar, Decl(es6ClassTest.ts, 11, 12))
|
|
>this : Symbol(Foo, Decl(es6ClassTest.ts, 7, 1))
|
|
>gar : Symbol(Foo.gar, Decl(es6ClassTest.ts, 11, 12))
|
|
}
|
|
}
|
|
|
|
var f = new Foo();
|
|
>f : Symbol(f, Decl(es6ClassTest.ts, 31, 3))
|
|
>Foo : Symbol(Foo, Decl(es6ClassTest.ts, 7, 1))
|
|
|
|
declare module AmbientMod {
|
|
>AmbientMod : Symbol(AmbientMod, Decl(es6ClassTest.ts, 31, 18))
|
|
|
|
export class Provide {
|
|
>Provide : Symbol(Provide, Decl(es6ClassTest.ts, 33, 27))
|
|
|
|
foo:number;
|
|
>foo : Symbol(Provide.foo, Decl(es6ClassTest.ts, 34, 23))
|
|
|
|
zoo:string;
|
|
>zoo : Symbol(Provide.zoo, Decl(es6ClassTest.ts, 35, 13))
|
|
|
|
constructor();
|
|
|
|
private boo();
|
|
>boo : Symbol(Provide.boo, Decl(es6ClassTest.ts, 38, 16))
|
|
|
|
bar();
|
|
>bar : Symbol(Provide.bar, Decl(es6ClassTest.ts, 40, 16))
|
|
}
|
|
}
|
|
|
|
|
|
//class GetSetMonster {
|
|
|
|
|
|
// // attack(target) {
|
|
// // WScript.Echo("Attacks " + target);
|
|
// // }
|
|
// // The contextual keyword "get" followed by an identifier and
|
|
// // a curly body defines a getter in the same way that "get"
|
|
// // defines one in an object literal.
|
|
// // get isAlive() {
|
|
// // return this.health > 0;
|
|
// // }
|
|
|
|
// // Likewise, "set" can be used to define setters.
|
|
// set health(value:number) {
|
|
// if (value < 0) {
|
|
// throw new Error('Health must be non-negative.')
|
|
// }
|
|
// this.health = value
|
|
// }
|
|
// get health() { return 0; }
|
|
|
|
// constructor(this.name: string, health: number) {
|
|
// this.health = 0;
|
|
// }
|
|
//}
|
|
|
|
|
|
//class bar {
|
|
|
|
// static fnOverload( );
|
|
|
|
// static fnOverload(foo: string){ } // no error
|
|
|
|
// constructor(){};
|
|
|
|
//}
|
|
|