I upgraded my dependencies via npm install or something and now TypeScript 3.6 reports a weird error message
Property 'myGetter' implicitly has type 'any', because its get accessor lacks a return type annotation.
I don't understand what's happening. My code hasn't changed at all. Moving to TypeScript 3.7 fixes the problem, and TypeScript 3.5, I get the same error along with a new error:
An accessor cannot be declared in an ambient context.
Upgrading TypeScript to 3.6.5, or ideally a newer version, will fix the issue. Just run
or if you really need to stay locked to TypeScript 3.6
The likely reason why this is happening is that one of your dependencies started using TypeScript 3.7 or newer.
TypeScript 3.7 started generating
getaccessors in.d.tsfiles, but left their types off forprivatemembers. TypeScript 3.6.4 assumed this was an error undernoImplicitAny. That's a bug that was fixed in 3.6.5 and TypeScript 3.7.