TypeScript/tests/cases/compiler/setterBeforeGetter.ts

12 lines
247 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
class Foo {
private _bar: { a: string; };
// should not be an error to order them this way
set bar(thing: { a: string; }) {
this._bar = thing;
}
get bar(): { a: string; } {
return this._bar;
}
}