I am using Visual Studio Code (VSC) 0.10.11 on Windows and Mac. For the purpose of this question I have this small JavaScript snippet:
'use strict';
const os = require('os');
console.log(os.homedir());
I followed John Papa on Visual Studio Code (Blog entry and Pluralsight Visual Studio Code JavaScript Intellisense - for those who have an account) and therefore I would expect that VSC provides Intellisense and Quick fix options when typings are available.
In the snippet above VSC recognizes console
and log()
(I use hoover, but it is the same with Intellisense):
but not os
and homedir()
:
But all 4 typings are available in typings/main/ambient/node/index.d.ts
. I know that the difference is the require
in the case of os
, but in John Papa's video course VSC also provided IntelliSense for required modules. A difference is that John Papa used tsd
while I am using typings
.
So my questions are
- how can I enable Intellisense for all known typings?
- what do I have to do that VSC offers me Quick fix (green line under moduls with missing typings)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…