The following JavaScript is saved into a file called test.js
iDontExist();
(this is the entire file)
VSCode doesn't show the highlights for the iDontExist
function, which isn't imported or required anywhere.
How can I make VScode highlight the undefined function?
Note other Intellisense features (eg, inspecting imports) in JS files (not TS files) seem to work fine:
Undefined functions in VSCode aren't automatically highlighted when they are undefined because ofglobals , this includes a totally different setup to get the highlighting running:
Using the ESlint Extension to get undefined functions or errors highlighted.
You can also use ts-check
, which is what I use and has been working fine.
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.