I'm currently working on an Angular 2 project with typescript and encountering numerous errors originating from the angular web-modules.
[error] node-modules\webjars\@angular\common\src\directives\ng_class.d.ts:80: TS2304 Cannot find name 'Set'.
[error] rawClass: string | string[] | Set<string> | {
[error] ^
[error] node-modules\webjars\@angular\common\src\facade\async.d.ts:33: TS2304 Cannot find name 'Promise'.
[error] static fromPromise(promise: Promise<any>): Observable<any>;
[error] ^
[error] node-modules\webjars\@angular\common\src\facade\async.d.ts:34: TS2304 Cannot find name 'Promise'.
[error] static toPromise(obj: Observable<any>): Promise<any>;
[error]
Clearly, I don't want these libraries to be checked by my typescript. Therefore, I have configured my tsconfig.json
like this:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators":true,
"sourceMap": true,
"noImplicitAny":true,
"noFallthroughCasesInSwitch":true,
"noImplicitReturns":true,
"outDir": "./target/ts"
},
"exclude": [
"node_modules",
"project/target",
"typings/main",
"typings/main.d.ts",
"typings/browser",
"target/web"
]
}
Is there anything else that I need to do?