Skip to content
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

Un-consolidate overloads for Map and WeakMap #28052

Merged
1 commit merged into from
Oct 22, 2018
Merged

Un-consolidate overloads for Map and WeakMap #28052

1 commit merged into from
Oct 22, 2018

Conversation

ghost
Copy link

@ghost ghost commented Oct 22, 2018

Fixes #27951

@ghost ghost assigned sandersn Oct 22, 2018
new <K extends object = object, V = any>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
Copy link
Contributor

@ExE-Boss ExE-Boss Nov 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this PR only changed this WeakMap constructor overload, #23551 has resurfaced once again, and the following is still valid:

new WeakMap<object>();

I’m fixing that in #41635 #56713.

@@ -0,0 +1,2 @@
// @lib: es6
new Map<string>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should’ve also had a test case for:

new WeakMap<object>();

I’m fixing that in #41635.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants