TypeScript/tests/cases/compiler/setterBeforeGetter.ts
2014-07-12 17:30:19 -07:00

12 lines
247 B
TypeScript

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;
}
}