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

21 lines
840 B
Plaintext
Raw Normal View History

tests/cases/compiler/setterBeforeGetter.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/setterBeforeGetter.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
==== 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; }) {
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
this._bar = thing;
}
get bar(): { a: string; } {
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
return this._bar;
}
}