So I've defined my 'enum' at the top of my javascript file as so:var loaderOptions = { "SHOW": 0, "CHANGEPAGE": 1, "HIDE": 2};I wanted this enum to be used in a utility function used later ( showLoader(miliseconds, elementOrPageID, option, textMessage, callbackFunc) {} ).This is all working fabulously as I have intellisense when I call the enum/variableHOWEVER, I would like to move the function and its enum OUT of my main file into a utility file ... I can make this work just fine but I lose the intellisense ... any tricks to be able to keep this ability? 解决方案 Add a References Directive on top of the JavaScript file/// <reference path="file1.js" />MSDN Doc 这篇关于在其他文件中获得JS的VS javascript intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-27 01:25
查看更多