Patrick Dubroy
@dubroy
Somewhat surprising that TypeScript doesn't flag this as an error. (And yes, `strictFunctionChecks` is enabled.)

I wonder why?

Playground link: typescriptlang.org/play?noImplici…
Tweet image
Sep 13, 2021 · 3

I'm guessing it's because the type of `this` can only be observed from inside the function. So it's not unsafe to allow the use of an arrow function here, and it would overly restrictive to disallow it.

https://twitter.com/dubroy/status/1437405983752564738 ∙ Archived on 2025-03-28.

← Twitter Archive: 2021