VS Code中的jQuery intellisense

编程入门 行业动态 更新时间:2024-10-26 04:24:59
本文介绍了VS Code中的jQuery intellisense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经尝试过了:

Visual Studio Code中的JQuery智能感知

和这个:

shrekshao.github.io/2016/06/20/vscode-01/

但是它什么也没做,VS Code不会添加jquery intellisense,我已经尝试解决了好几个小时了,但是它却无法正常工作

But it does nothing, VS Code just won't add jquery intellisense, I've been trying to solve this for hours but it just won't work

推荐答案

大多数博客帖子现在已过时,因为我们终于有了1.8+版的自动类型获取功能-您不再需要自己安装键入内容.

Most of the blog postings are now outdated, as we finally have automatic type acquisition with version 1.8+ - you no longer need to install the typings yourself.

我建议您阅读官方文档,该文档始终是最新的: code.visualstudio/docs/languages/javascript

I recommend reading the official documentation, its always up to date: code.visualstudio/docs/languages/javascript

如果您使用npm并在项目中包含 package.json ,并且jQuery列在其中,则它应该已经可以工作.

If you use npm and have a package.json in your project and jQuery is listed there, it should already work.

如果您不使用npm,则可以在项目根目录中创建文件 jsconfig.json ,其中包含以下内容,您可以使用:

If you do not use npm, you can create the file jsconfig.json in the project root with the following content and you are good to go:

{ "typeAcquisition": { "include": [ "jquery" ] } }

更多推荐

VS Code中的jQuery intellisense

本文发布于:2023-11-17 14:02:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1610139.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Code   jQuery   intellisense

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!