2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(6,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts (2 errors) ====
|
|
|
|
|
|
|
|
function /*1*/makePoint(x: number) {
|
|
|
|
return {
|
|
|
|
b: 10,
|
|
|
|
get x() { return x; },
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
set x(a: number) { this.b = a; }
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
var /*4*/point = makePoint(2);
|
|
|
|
var /*2*/x = point.x;
|
|
|
|
point./*3*/x = 30;
|