views:

344

answers:

1

I have a JavaScript class that I have made and put it into its own .js file. When I reference the the file from a web page and create an instance of that class there is no intellisense telling me the methods\variables available, it just show constructor as the only method. But when I copy the class and past it straight into the web page the intellisense works just fine.

Does any one know what the problem might be?

+1  A: 

You need to add reference on the top of your javascript file:

/// <reference path="yourJSfile.js" />

And then you have to refresh intellisense: Menu Edit -> intellisense -> update jscript intellisense

Jarek
no that's not the problem. The script that reference it is on the page in a <script> tag and I also have a tag above that with <script type="txt/javascript" src="WhereMyClassIs.js">
Superdumbell
@Superdumbell Why did you accept this answer if it doesn't solve the problem?
Matthew Lock