TypeScript/tests/baselines/reference/unknownSymbols1.types
Wesley Wigham 5353475fce Always collect type and symbol baselines (#18621)
* 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
2017-09-22 15:52:04 -07:00

86 lines
1.3 KiB
Plaintext

=== tests/cases/compiler/unknownSymbols1.ts ===
var x = asdf;
>x : any
>asdf : any
var y: asdf;
>y : any
>asdf : No type information available!
function foo(x: asdf, y: number): asdf { }
>foo : (x: any, y: number) => any
>x : any
>asdf : No type information available!
>y : number
>asdf : No type information available!
function foo2() {
>foo2 : () => any
return asdf;
>asdf : any
}
var z = <asdf>x; // should be an error
>z : any
><asdf>x : any
>asdf : No type information available!
>x : any
class C<T> {
>C : C<T>
>T : T
foo: asdf;
>foo : any
>asdf : No type information available!
bar: C<asdf>;
>bar : C<any>
>C : C<T>
>asdf : No type information available!
}
class C2 implements asdf { }
>C2 : C2
>asdf : No type information available!
interface I extends adsf { }
>I : I
>adsf : No type information available!
class C3 { constructor(x: any) { } }
>C3 : C3
>x : any
class C4 extends C3 {
>C4 : C4
>C3 : C3
constructor() {
super(asdf);
>super(asdf) : void
>super : typeof C3
>asdf : any
}
}
var x2 = this.asdf; // no error, this is any
>x2 : any
>this.asdf : any
>this : any
>asdf : any
class C5 {
>C5 : C5
constructor() {
this.asdf = asdf;
>this.asdf = asdf : any
>this.asdf : any
>this : this
>asdf : any
>asdf : any
}
}