简体   繁体   English

带有Aurelia的Visual Studio 2017 Intellisense

[英]Visual Studio 2017 Intellisense with Aurelia

I have been trying desperately for a month to figure out a way to get JavaScript intellisense to work for Aurelia in Visual Studio 2017. I know there is no definitions in npm @types. 我已经拼命地尝试了一个月,以期找到一种方法使JavaScript intellisense在Visual Studio 2017中为Aurelia工作。我知道npm @types中没有定义。 I tried to copy over the index.d.ts file from the local node_modules folders to a folder in the Salsa Cache at c:\\Users\\User\\AppData\\Local\\Microsoft\\Typescript\\2.5\\@types that is named the same as the Aurelia module, along with the package.json. 我试图将index.d.ts文件从本地node_modules文件夹复制到Salsa缓存中位于c:\\ Users \\ User \\ AppData \\ Local \\ Microsoft \\ Typescript \\ 2.5 \\ @types的文件夹中,该文件夹的名称与Aurelia模块,以及package.json。 It didn't work. 没用 I tried adding a jsconfig.json. 我尝试添加jsconfig.json。 Also didn't work. 也没有用。 Is there anyone with Aurelia intellisense working in VS 2017???????? 有人在VS 2017中使用Aurelia intellisense吗???????

I'm not sure if this is applicable to your installation, but there is a known issue ( https://github.com/jspm/jspm-cli/issues/1344 ) with type definitions when Aurelia is installed via jspm. 我不确定这是否适用于您的安装,但是当通过jspm安装Aurelia时,存在类型定义的已知问题( https://github.com/jspm/jspm-cli/issues/1344 )。 The solution for now, unfortunately, is to also install Aurelia as a dev dependency via npm. 不幸的是,目前的解决方案是通过npm将Aurelia安装为dev依赖项。

npm install --save-dev aurelia-framework aurelia-bootstrapper aurelia-pal-browser aurelia-polyfills

This takes up more space, but should resolve the issue until it's fixed properly. 这会占用更多空间,但是应该解决此问题,直到正确解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM