为VS code中的项目添加特定的智能提示功能

当我们的在用vscode开发项目的时候, 如果项目中引用了jquery包, 我们可以下面的方式获得jquery的类型提示

npm install @types/jquery --save-dev

或我们想开发node类型的项目我们可以

npm install @types/jquery --save-dev

这时在项目的node_modules中会多一个@types的目录, 里面有已安装项目的类型定义.

为什么使用npm的方式安装可以看下面这篇文章

https://cloud.tencent.com/developer/news/301679   typescirpt学习之路,×.d.ts和@types关系理解

https://segmentfault.com/a/1190000018013282   jsconfig.js的作用

https://juejin.im/post/5c7ddc13f265da2dd868b4da  为什么 VSCode 需要 jsconfig.json

https://code.visualstudio.com/docs/languages/javascript

https://code.visualstudio.com/docs/languages/jsconfig

https://github.com/Microsoft/TypeScript/wiki/JavaScript-Language-Service-in-Visual-Studio

原文地址:https://www.cnblogs.com/answercard/p/10416873.html