2014-07-13 01:04:16 +02:00
|
|
|
//// [propertyOrdering.ts]
|
|
|
|
class Foo {
|
|
|
|
constructor(store: string) { }
|
|
|
|
public foo() {
|
|
|
|
return this._store.length; // shouldn't be an error
|
|
|
|
}
|
|
|
|
public _store = store; // no repro if this is first line in class body
|
|
|
|
|
|
|
|
|
|
|
|
public bar() { return this.store; } // should be an error
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Bar {
|
|
|
|
public foo() {
|
|
|
|
|
|
|
|
return this._store.length; // shouldn't be an error
|
|
|
|
|
|
|
|
}
|
|
|
|
constructor(store: string) {
|
|
|
|
this._store = store;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [propertyOrdering.js]
|
|
|
|
var Foo = (function () {
|
|
|
|
function Foo(store) {
|
2014-08-15 22:18:54 +02:00
|
|
|
this._store = store; // no repro if this is first line in class body
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
Foo.prototype.foo = function () {
|
2014-08-16 00:16:17 +02:00
|
|
|
return this._store.length; // shouldn't be an error
|
2014-07-13 01:04:16 +02:00
|
|
|
};
|
|
|
|
Foo.prototype.bar = function () {
|
|
|
|
return this.store;
|
2014-08-15 22:18:54 +02:00
|
|
|
}; // should be an error
|
2014-07-13 01:04:16 +02:00
|
|
|
return Foo;
|
|
|
|
})();
|
|
|
|
var Bar = (function () {
|
|
|
|
function Bar(store) {
|
|
|
|
this._store = store;
|
|
|
|
}
|
|
|
|
Bar.prototype.foo = function () {
|
2014-08-16 00:16:17 +02:00
|
|
|
return this._store.length; // shouldn't be an error
|
2014-07-13 01:04:16 +02:00
|
|
|
};
|
|
|
|
return Bar;
|
|
|
|
})();
|