2017-06-18 101 views
1

我剛用了anglar4 cli來創建一個新項目,並開始出現以下錯誤。如何擺脫angular1項目中ellipse的experimentalDecorators警告

Experimental support for decorators is a feature that is subject to change in a future release. Set 
the 'experimentalDecorators' option to remove this warning. 

對於每個註釋。

我之前沒有使用ng cli,那麼我沒有看到任何類似的警告。

檢查我tsconfig,

{ 
    "compileOnSave": false, 
    "compilerOptions": { 
    "outDir": "./dist/out-tsc", 
    "baseUrl": "src", 
    "sourceMap": true, 
    "declaration": false, 
    "moduleResolution": "node", 
    "emitDecoratorMetadata": true, 
    "experimentalDecorators": true, 
    "target": "es5", 
    "module": "commonjs", 
    "noImplicitAny": false, 
    "suppressImplicitAnyIndexErrors": true, 
    "typeRoots": [ 
     "node_modules/@types" 
    ], 

    "exclude": 
    [ 
     "node_modules", 
     "**/*.spec.ts" 
    ], 

    "lib": [ 
     "es2016", 
     "dom" 
    ] 
    } 
} 

沒有什麼特別的。

如何在eclipse中爲angular4項目刪除警告?這是非常煩人的虛假警報。

我在eclipse中使用了typecript插件。

感謝

回答

0

由於您tsconfig文件具有正確的標誌,我必須承擔運行不讀取配置文件中的打字稿編譯器。它要麼讀取不同的配置文件,要麼根本不讀取。那個tsconfig文件中的其他標誌是否會影響編譯?

也許檢查TypeScript插件,看看它是否在尋找文件的其他地方。