问题
I am trying to convert some existing JavaScript code by using TypeScript, One example I am using is to create Highcharts classes, the Highcharts definition is from https://github.com/borisyankov/DefinitelyTyped/blob/master/highcharts/highcharts.d.ts
We all know HighchartsOptions has a property title
.
If I define the object in this way, I have intellisense

But if I define object this way

Any specific reason why Visual Studio behaves differently?
回答1:
It's just a bug. See this issue on CodePlex to track when it gets fixed.
来源:https://stackoverflow.com/questions/14992232/typescript-intellisense-works-differently-if-i-define-object-in-different-ways