Hacker News new | ask | show | jobs
by krzkaczor 2491 days ago
> - using `any` nearly always comes back to bite you as you trick yourself into feeling typesafe

This. I was so frustrated with this point that I created a tool for automatic tracking type coverage on PRs called TypeCov.

https://github.com/codechecks/typecov

1 comments

You can avoid this dance all together by using `unknown` with more recent versions of TS. Think of `unknown` as a type-safe `any`.