Recently, I encountered a challenge while upgrading my Angular project from version 6 to version 10. Upon migration, I noticed a significant number of TypeScript errors, particularly related to properties that do not exist.
In TypeScript 2, these errors were overlooked, allowing our application to build without any issues. However, with Angular 10 now using TypeScript 3, such errors are no longer permissible.
To address this issue, I referred to the Angular documentation and adjusted the tsconfig.json file as shown below:
{
"compileOnSave": false,
"compilerOptions": {
"importHelpers": true,
"skipLibCheck": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"downlevelIteration": true,
"typeRoots": [
"node_modules/@types"
],
"lib": ["es6", "es7", "es2017", "dom"],
"module": "esnext",
"types": [],
"baseUrl": ".",
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"strict": false
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"src/test.ts",
"src/**/*.spec.ts"
]
}
Despite setting 'noImplicitAny' to false and 'suppressImplicitAnyIndexErrors' to true, errors like the following continue to persist:
error TS2339: Property 'webkitRequestFullscreen' does not exist on type 'HTMLElement'.
If anyone has experience dealing with similar challenges when upgrading from Angular 6 to a later version, I would appreciate hearing about your solutions. Given the size of our project, addressing each file individually is not feasible.
Thank you in advance for your advice.