TypeScript/tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt
2014-07-12 17:30:19 -07:00

21 lines
657 B
Plaintext

==== tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts (2 errors) ====
module ObjectLiteral {
var ThisInObjectLiteral = {
_foo: '1',
get foo(): string {
~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return this._foo;
},
set foo(value: string) {
~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
this._foo = value;
},
test: function () {
return this._foo;
}
}
}