TypeScript/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts

13 lines
270 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
// @declaration: true
// @target: es5
2014-07-13 01:04:16 +02:00
function /*1*/makePoint(x: number) {
return {
b: 10,
get x() { return x; },
set x(a: number) { this.b = a; }
};
};
var /*4*/point = makePoint(2);
var /*2*/x = point.x;
point./*3*/x = 30;