17 lines
542 B
Plaintext
17 lines
542 B
Plaintext
|
==== tests/cases/compiler/setterBeforeGetter.ts (2 errors) ====
|
||
|
class Foo {
|
||
|
|
||
|
private _bar: { a: string; };
|
||
|
// should not be an error to order them this way
|
||
|
set bar(thing: { a: string; }) {
|
||
|
~~~
|
||
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
||
|
this._bar = thing;
|
||
|
}
|
||
|
get bar(): { a: string; } {
|
||
|
~~~
|
||
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
||
|
return this._bar;
|
||
|
}
|
||
|
}
|
||
|
|