I am new to Typescript and just exploring the object feature of typescript where I am stuck in accessing the object as we do often in JS.
module Demo{
var points1: Object = { x:10};
var z = points1.x;
}
At static type checking, I am getting the error Error:(3, 21) TS2339: Property 'x' does not exist on type 'Object'.
According to me the compiled JS is correct.
var Demo;
(function (Demo) {
var points1 = { x: 10 };
var z = points1.x;
console.log(points1);
})(Demo || (Demo = {}));
I am feeling it difficult to identify the error. Any help will be appreciated.