‘this’ implicitly has type ‘any’ because it does not have a type annotation
The error is indeed fixed by inserting this with a type annotation as the first callback parameter. My attempt to do that was botched by simultaneously changing the callback into an arrow-function: foo.on(‘error’, (this: Foo, err: any) => { // DON’T DO THIS It should’ve been this: foo.on(‘error’, function(this: Foo, err: any) { or this: … Read more