简体   繁体   中英

TypeScript IntelliSense not working as expected in VS2012

I am playing with typescript and for some reason the intellisense does not work on Visual Studio 2012. Anyways take a look at this example: LINK

When I try to run that same exact example in VS2013 I do not get intellsense on the lines that I comment. Is this a bug? I have version 0.9.1.1

In other words note how when I press . I do not get intellisense: 在此处输入图片说明

In typescript website I will do get intellisense http://www.typescriptlang.org/Playground/

PS

why down vote without even saying why?

var myArray = new Class2[16];

This line does not create an array of size 16. It tries to invoke the new operator on the member called "16" of Class2 , which is of type any . If you want an array, write something like

var myArray: Class2[] = [];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM