|Re: How to let JSDT know the variable type? [message #648866 is a reply to message #648732]
||Fri, 14 January 2011 18:50
|| Ian Tewksbury
Registered: July 2009
Location: RTP, NC, USA
Ignore my last message, there is an easier way, actually just the way you suggested works.
We support both 1.0 and 2.0 JSDoc defined here http://sourceforge.net/projects/jsdoc/ and here http://code.google.com/p/jsdoc-toolkit/ respectively.
In the 2.0 specification there is an @type annotation.
So this works:
* @type Model
var myLocalVar = myModel;
And then you shoudl be able to get the contenet assist just as you would if you did
var myLocalVar = new Model();
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
Powered by FUDForum
. Page generated in 0.01763 seconds