Skip to content

Commit e2ee3c5

Browse files
committed
Removed constructor typings which can't be used
Also corrected some parameter names.
1 parent 2468d44 commit e2ee3c5

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/lib/es2015.collection.d.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interface Map<K, V> {
22
clear(): void;
33
delete(key: K): boolean;
4-
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
4+
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
55
get(key: K): V | undefined;
66
has(key: K): boolean;
77
set(key: K, value?: V): this;
@@ -17,19 +17,13 @@ declare var Map: MapConstructor;
1717

1818
interface ReadonlyMap<K, V> {
1919
forEach(
20-
callbackfn: (value: V, index: K, map: ReadonlyMap<K, V>) => void,
20+
callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void,
2121
thisArg?: any): void;
2222
get(key: K): V|undefined;
2323
has(key: K): boolean;
2424
readonly size: number;
2525
}
2626

27-
interface ReadonlyMapConstructor {
28-
new<K, V>(entries?: [K, V][]): ReadonlyMap<K, V>;
29-
readonly prototype: ReadonlyMap<any, any>;
30-
}
31-
declare var ReadonlyMap: ReadonlyMapConstructor;
32-
3327
interface WeakMap<K, V> {
3428
delete(key: K): boolean;
3529
get(key: K): V | undefined;
@@ -48,7 +42,7 @@ interface Set<T> {
4842
add(value: T): this;
4943
clear(): void;
5044
delete(value: T): boolean;
51-
forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
45+
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
5246
has(value: T): boolean;
5347
readonly size: number;
5448
}
@@ -61,18 +55,12 @@ interface SetConstructor {
6155
declare var Set: SetConstructor;
6256

6357
interface ReadonlySet<T> {
64-
forEach(callbackfn: (value: T, index: T, set: ReadonlySet<T>) => void, thisArg?: any):
58+
forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any):
6559
void;
6660
has(value: T): boolean;
6761
readonly size: number;
6862
}
6963

70-
interface ReadonlySetConstructor {
71-
new<T>(values?: T[]): ReadonlySet<T>;
72-
readonly prototype: ReadonlySet<any>;
73-
}
74-
declare var ReadonlySet: ReadonlySetConstructor;
75-
7664
interface WeakSet<T> {
7765
add(value: T): this;
7866
delete(value: T): boolean;

0 commit comments

Comments
 (0)