Hacker News new | ask | show | jobs
by leshenka 697 days ago
It’s fine to have an escape hatch when you can’t figure/don't care about types (yes sometimes you should use unknown but that’s another topic)

But at least TS forces (if enabled by strict flag) you to explicitly mark all those places. You can always revisit them later.

Case in point: I’ve written A LOT of redux-saga code and figuring out types for that was exceptionally difficult for me. Sprinkled all that with a ton of anys. Had a few bugs but not anything serious.

Finally rewriting all that slop with async-await and am really happy about it