I had this issue on a TypeScript project:
error TS7005: Variable 'tagArray' implicitly has an 'any[]' type.
The solution was to cast the array better. Typescript needs to know what is going in the array:
const tagArray = [];
const tagArray: number[] = [];