mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: ambiguous imports in IDEs (#4958)
Recently the Universal App has been added to the repository. The universal-app contains a script that runs inside of Node and therefore uses Node APIs. The global tsconfig file that is used to provide proper autocompletion in IDEs includes every TS file inside of `src/` and therefore the `prerender.ts` file is also included. This is problematic because now the NodeJS @types are being loaded as well and ambiguous imports appear in editors. Causing for example `setTimeout` calls to return a `Timer` instead of a number (error in your IDEs)
This commit is contained in:
committed by
Andrew Seguin
parent
6601e3d873
commit
ed72d94e96
+6
-1
@@ -16,5 +16,10 @@
|
||||
"@angular/material": ["./lib/public_api.ts"],
|
||||
"@angular/cdk": ["./cdk/public_api.ts"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
// Exclude files that depend on Node APIs because those depend on the Node types and therefore
|
||||
// cause ambiguous imports. For example `setTimeout()` will return a Timer instead of a number.
|
||||
"universal-app/prerender.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user