TypeScript/tests/cases/compiler/declFileObjectLiteralWithAccessors.ts
2014-07-12 17:30:19 -07:00

12 lines
No EOL
253 B
TypeScript

// @declaration: true
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;