如何获取IntelliJ 14来提取Typescript tsconfig.json文件?

Jon*_*nds 2 intellij-idea typescript intellij-14 typescript1.7

如何配置IntelliJ 14以选择Typescript tsconfig.json文件?

捆绑的Typescript编译器是v1.4,它不支持tsconfig.json文件,根据:

https://github.com/Microsoft/TypeScript/wiki/tsconfig.json

因此,在文件>设置>语言和框架> TypeScript>编译器版本中,我选择了“自定义目录”选项并将其设置为:

$HOME_DIR\npm\node_modules\typescript\lib
Run Code Online (Sandbox Code Playgroud)

这是我安装的Typescript版本1.7.5,它确实支持tsconfig.json文件。

但是,在使用TypeScript编译器窗格中的“编译所有项目文件”选项时,此操作不会拾取tsconfig.json文件。

我也尝试过将命令行选项设置为:

-p $MY_PROJ\src\main\web
Run Code Online (Sandbox Code Playgroud)

其中包含tsconfig.json文件。这也不起作用,并且TypeScript编译器会产生以下错误:

Error: Cannot start compiler process: Error: Cannot read tsconfig
Run Code Online (Sandbox Code Playgroud)

有谁知道如何使它工作?

谢谢。

tgk*_*tgk 5

webpack过去一直在转换为JS,但想继续使用IntelliJ自动完成功能和打字稿警告。

我将tsconfig.json文件重新定位到一个子目录,buildPipeline/config/tsconfig.json而IntelliJ没有选择某些tsc设置,例如"experimentalDecorators": true

好像我成功通过使用--p path/to/tsconfig.json“首选项”>“语言和框架”>“ TypeScript” 指定配置文件的位置一样

TypeScript服务选项

希望对其他人有用吗?