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

29 lines
725 B
Plaintext
Raw Normal View History

2015-04-27 03:31:47 +02:00
tests/cases/compiler/lambdaPropSelf.ts(21,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/lambdaPropSelf.ts (1 errors) ====
declare var ko: any;
class Person {
children: string[];
constructor (public name: string, children: string[]) {
this.children = ko.observableArray(children);
}
addChild = () => this.children.push("New child");
}
class T {
fo() {
var x = this;
}
}
module M {
var x = this;
~~~~
2015-04-27 03:31:47 +02:00
!!! error TS2331: 'this' cannot be referenced in a module or namespace body.
2014-07-13 01:04:16 +02:00
}