我使用的IntelliJ IDEA 2017年2月4日製定角度(4個不是JS)應用程序。一切正常,運行良好,但IntelliJ標記所有@angular
導入TypeScript文件與紅色的波浪狀。角的打字稿的IntelliJ進口標有抽搐
的錯誤消息是TS2307: Cannot find module '@nagular/abc'
存在Jetbrain的支持Typescript does not resolve modules through tsconfig.json's baseUrl
這是我tsconfig.json文件還發出打開。
請注意,tsconfig.json文件存儲不在項目的根,但./app/ui目錄 - 如果該事項。
{
"compilerOptions": {
"alwaysStrict": true,
"noImplicitReturns": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "system",
"target": "es5",
"removeComments": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "generated",
"inlineSourceMap": true,
"importHelpers": true,
"baseUrl": ".",
"paths": {
"tslib": [
"../../node_modules/tslib/tslib.d.ts"
]
},
"skipLibCheck": true,
"downlevelIteration": true
},
"exclude": [
"lib"
]
}
這可能是的IntelliJ期待在'tsconfig.json' –
當你將鼠標懸停在進口的紅線它說什麼了定義的代碼風格? –
我已經添加了錯誤信息 –