TypeScript/tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt

25 lines
1,013 B
Plaintext
Raw Normal View History

tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts (2 errors) ====
module ObjectLiteral {
var ThisInObjectLiteral = {
_foo: '1',
get foo(): string {
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
return this._foo;
},
set foo(value: string) {
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
this._foo = value;
},
test: function () {
return this._foo;
}
}
}