TS7034

error TS7034: Variable ‘expectations’ implicitly has type ‘any[]’ in some locations where its type cannot be determined.

Bad Code ❌

1
let expectations = [];

Fixed Code ✔️

1
let expectations: string[] = [];

Unrecommended solutions: You can set noImplicitAny to false or strict to false in your tsconfig.json.