TypeScript/tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt
2014-09-12 13:35:07 -07:00

25 lines
1,013 B
Plaintext

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.
==== 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.
return this._foo;
},
set foo(value: string) {
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
this._foo = value;
},
test: function () {
return this._foo;
}
}
}