TypeScript/tests/baselines/reference/autoLift2.errors.txt

52 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/autoLift2.ts (10 errors) ====
class A
{
constructor() {
this.foo: any;
~
!!! ';' expected.
~~~
!!! Property 'foo' does not exist on type 'A'.
~~~
!!! Cannot find name 'any'.
this.bar: any;
~
!!! ';' expected.
~~~
!!! Property 'bar' does not exist on type 'A'.
~~~
!!! Cannot find name 'any'.
}
baz() {
this.foo = "foo";
~~~
!!! Property 'foo' does not exist on type 'A'.
this.bar = "bar";
~~~
!!! Property 'bar' does not exist on type 'A'.
[1, 2].forEach((p) => this.foo);
~~~
!!! Property 'foo' does not exist on type 'A'.
[1, 2].forEach((p) => this.bar);
~~~
!!! Property 'bar' does not exist on type 'A'.
}
}
var a = new A();
a.baz();