-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature idea: Change Map from any --> unknown #41
Comments
Maps already have a generic option: Up for debate, it is safer, but you can also just add a starting generic. |
I'm aware that maps have generic parameters. The point of this issue is that sometimes programmers forget to specify the generic parameters, so the default generic parameters are used, which means that |
Agree, this issue deserves to stay open! My response is on the PR |
FYI, the title should be "any --> unknown" 🙂 |
Ultimately this is just about the default value, so |
yes |
So, what is the status of the PR? Seems like the test is accurate - I had the same defined myself in a big repo at work, and it has not caused any issues - i suggest this ends up being merged. |
Seems this issue was closed in #53 ? |
Correct, closed by #53 |
Both of the default generic parameters of
Map
areany
.You should change them to
unknown
for the same reasons that you e.g. changeJSON.parse
.For a more in-depth discussion on this, see: microsoft/TypeScript#52552
The text was updated successfully, but these errors were encountered: