3 ms·
but requires a lot of extra work That's not my experience at all. I've found that you get most of the benefits via type inference with very little additional w
by orangecat 4y ago
but requires a lot of extra work
That's not my experience at all. I've found that you get most of the benefits via type inference with very little additional work. Although if you try to be super strict and forbid any use of "any" or casting, then that could get annoying and possibly counterproductive.
- matthewwolfe 4y agoUnless you are integrating typescript into an existing codebase, having the strictest feature set is great. I’ve never felt the need to use any/unknown, except for very occasionally when working with a library that has spotty typescript support.
- phendrenad2 4y agoYeah, almost everyone forbids "any". It's the default in most linter configs too.
- schwartzworld 4y ago> Although if you try to be super strict and forbid any use of "any" or casting, Why would you ever want to use any if you could avoid it? It completely undermines the benefits of TS. Most of the time you really want unknown or generics.