How to Solve "ng build" Error TS7015: Element implicitly has an ‘any’ type because index expression is not of type 'number'
Today I got error message when running "ng build" on my project using Angular version 12.0.1. The error message is Error TS7015: Element implicitly has an ‘any’ type because index expression is not of type ‘number’.
To solve this problem, edit the file tsconfig.json
(TypeScript compiler configuration) and add the following configuration to the compilerOptions
key:
"compilerOptions": {
"suppressImplicitAnyIndexErrors": true,
"strictNullChecks": false,
"strictPropertyInitialization": false,
}
Okay, that's it. hope it helps anyone having the same issue. If you find it useful please star (:star:) & share.
That option is deprecated in typescript 5 (angular 17). Any ideas how to solve it without this option?