TypeScript Intellisense works differently if I define Object in different ways

I am trying to convert some existing JavaScript code using TypeScript. One example I use is creating Highcharts classes, defining Highcharts from https://github.com/borisyankov/DefinitelyTyped/blob/master/highcharts/highcharts.d.ts

We all know that HighchartsOptions has a title property.

If I define an object this way, I have intellisense

enter image description here

But if I define an object this way

enter image description here I do not have intellisense.

Any specific reason Visual Studio behaves differently?

+1
source share
1 answer

This is just a mistake. See this issue in CodePlex to track when it is fixed.

+2
source

All Articles