降低 javascript 智能感知 [英] Tone down javascript intellisense

查看:43
本文介绍了降低 javascript 智能感知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现 JavaScript 的默认智能感知建议无关紧要.浏览器原生功能太多我永远不会使用.

I find the default intellisense suggestions for Javascript irrelevant. Too many native browser functions I will never use.

有没有办法关闭/限制智能感知?例如隐藏浏览器方法,如上面链接中的方法.

Is there any way to turn off/limit intellisense? e.g. hide browser methods like the one in the link above.

推荐答案

要禁用默认的全局变量集,请在项目的根目录下创建一个 jsconfig.json 文件,内容如下:

To disable the default set of globals, create a jsconfig.json file at the root of your project with the content:

{
  "compilerOptions": {
    "lib": ["es6"]
  }
}

这会阻止 VSCode 用于 JavaScript IntelliSense 的 TypeScript 服务自动包含有关 DOM api 的信息.

This prevents the TypeScript service that VSCode uses for JavaScript IntelliSense from automatically including information about the DOM api.

您可以阅读所有可用的libTypeScript 文档中的配置选项.

You can read about all the avalible lib configuration options in the TypeScript documentation.

这篇关于降低 javascript 智能感知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆