Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
4 replies
6enton

Why is TS dumb here?

https://www.typescriptlang.org/play?#code/MYGwhgzhAEDCDy8Ay0DeAoa0DaBrApgJ4Bc0EALgE4CWAdgOYC6pAFAG5ggCu+p5AFtQgBKaAF4AfGSp166AL7p0oSDHgBpaPgAe5fLQAmMBMjSZoIAPYh2nHsIxYswS7QjX8AOiv1b3fMLmWJT45FyUtNAARC7WUeaK8kA

Basically, why does it type the method param as
any
when I declare what type it is in the parent class? Is there a way to make that work?
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
Was this page helpful?