Skip to content

Commit

Permalink
Improve type infererence for Map
Browse files Browse the repository at this point in the history
  • Loading branch information
A0150315 authored and Netttttttttt committed Jun 27, 2022
1 parent 7cf6f8e commit 8d12d4e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions type-definitions/immutable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,7 @@ declare namespace Immutable {
* but since Immutable Map keys can be of any type the argument to `get()` is
* not altered.
*/
function Map<K, V>(collection?: Iterable<[K, V]>): Map<K, V>;
function Map<V>(obj: { [key: string]: V }): Map<string, V>;
function Map<K extends string | symbol, V>(obj: { [P in K]?: V }): Map<K, V>;
function Map<V>(obj: V): Map<keyof V, V[keyof V]>;

interface Map<K, V> extends Collection.Keyed<K, V> {
/**
Expand Down

0 comments on commit 8d12d4e

Please sign in to comment.