8000 Improve type for equals() (#1086) · immutable-js/immutable-js@dc21c59 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc21c59

Browse files
authored
Improve type for equals() (#1086)
The equals() function should really accept anything. As discussed in #876
1 parent 68d9a27 commit dc21c59

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

dist/immutable-nonambient.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@
21772177
* Note: This is equivalent to `Immutable.is(this, other)`, but provided to
21782178
* allow for chained expressions.
21792179
*/
2180-
equals(other: Iterable<K, V>): boolean;
2180+
equals(other: any): boolean;
21812181

21822182
/**
21832183
* Computes and returns the hashed identity for this Iterable.

dist/immutable.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@ declare module Immutable {
21772177
* Note: This is equivalent to `Immutable.is(this, other)`, but provided to
21782178
* allow for chained expressions.
21792179
*/
2180-
equals(other: Iterable<K, V>): boolean;
2180+
equals(other: any): boolean;
21812181

21822182
/**
21832183
* Computes and returns the hashed identity for this Iterable.

dist/immutable.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ declare class _Iterable<K, V, KI, II, SI> {
4040
static isAssociative(maybeAssociative: any): boolean;
4141
static isOrdered(maybeOrdered: any): boolean;
4242

43-
equals(other: Iterable<K,V>): boolean;
43+
equals(other: any): boolean;
4444
hashCode(): number;
4545
get(key: K): V;
4646
get<V_>(key: K, notSetValue: V_): V|V_;

type-definitions/Immutable.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@ declare module Immutable {
21772177
* Note: This is equivalent to `Immutable.is(this, other)`, but provided to
21782178
* allow for chained expressions.
21792179
*/
2180-
equals(other: Iterable<K, V>): boolean;
2180+
equals(other: any): boolean;
21812181

21822182
/**
21832183
* Computes and returns the hashed identity for this Iterable.

type-definitions/immutable.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ declare class _Iterable<K, V, KI, II, SI> {
4040
static isAssociative(maybeAssociative: any): boolean;
4141
static isOrdered(maybeOrdered: any): boolean;
4242

43-
equals(other: Iterable<K,V>): boolean;
43+
equals(other: any): boolean;
4444
hashCode(): number;
4545
get(key: K): V;
4646
get<V_>(key: K, notSetValue: V_): V|V_;

0 commit comments

Comments
 (0)
0