13 lines
467 B
Plaintext
13 lines
467 B
Plaintext
tests/cases/compiler/getsetReturnTypes.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
|
|
==== tests/cases/compiler/getsetReturnTypes.ts (1 errors) ====
|
|
function makePoint(x: number) {
|
|
return {
|
|
get x() { return x; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
}
|
|
};
|
|
var x = makePoint(2).x;
|
|
var y: number = makePoint(2).x; |