My Angular app is currently using 4.1.3
with
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c094b9b0a5b3a3b2a9b0b480f2eef0eef3">[email protected]</a>
. I've heard that for Typescript versions higher than 2.0, we should switch to using @types
.
Right now, I have typings set up in my app. To transition to using @types
, I have a few questions:
1. Should I remove typings
from both package.json
and tsconfig.json
? And then install the relevant @types
packages?
- How do I determine which
@types
packages are necessary for my specific application? - Additionally, should I delete the
typings.json
file?
In my package.json
:
{
"homepage": "https://github.com/angularclass/angular2-webpack-starter",
"license": "MIT",
"scripts": {
// scripts list...
},
// dependencies list...
}
Inside tsconfig.json
:
{
"compilerOptions": {
// compiler options...
},
"exclude": [
// exclusion list...
],
// other configuration settings...
}
During the migration from typings
to @types
, I encountered an issue when trying to run the app:
errors.ts?f2f7:42 ERROR TypeError: directive.ngOnChanges is not a function
// stack trace error message...