在Visual Studio中,可以使用内部模块而无需包含/// <reference path="..." />标记.
如何在WebStorm 10中实现同样的目标?
另一个问题是,如何让WebStorm将打包输入项目?WebStorm 10将输入放在缓存文件夹中.
我正在浏览angular.io(Angular 2)的分步教程.我正在使用打字稿.尝试编译时出现以下错误:
Cannot find external module 'angular2/angular2'
使用watch命令.
main.ts
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({
selector: 'my-app'
})
@View({
template: '<h1>My first Angular 2 App</h1>'
})
class AppComponent {
}
bootstrap(AppComponent);
Run Code Online (Sandbox Code Playgroud)
的index.html
<!DOCTYPE html>
<html>
<head>
<script src="https://jspm.io/system@0.16.js"></script>
<script src="https://code.angularjs.org/2.0.0-alpha.23/angular2.dev.js"></script>
</head>
<body>
<my-app></my-app>
<script>
System.import('main');
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
问:为什么会出现这个错误?
如何让WebStorm IDE为我下载的库提供代码完成功能.

如您所见angularjs-DefinitelyTyped,jQuery-DefinitelyTyped已经下载.
现在我相信我必须在我的.ts文件中引用定义文件.

但是,WebStorm保存定义文件的位置,以便我可以在我的代码中引用它们?
谢谢!