2017-06-18 100 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插件,看看它是否在寻找文件的其他地方。