2 ms·
I’m curious why not allow implicit anys instead of creating the tool that inserted anys? Seems roughly the same outcome but implicit anys would take a lot less
by city41 6y ago
I’m curious why not allow implicit anys instead of creating the tool that inserted anys? Seems roughly the same outcome but implicit anys would take a lot less work?
- dgoldstein0 6y agoBecause of the way we had type checking set up - our existing code already used noImplicitAny, and we wanted to keep that, and we were typechecking it all in one shot, together, so we couldn't have different typescript flags for different files. Now as to why to use noImplicitAny in the first place: mainly because implicit anys are usually accidents - places where developers didn't realize they should put a type. And the explicit `any` in many ways is sitting there for anyone who cares to replace it with something better; whereas implicit anys are much harder to notice.