Removed constructor typings which can't be used

Also corrected some parameter names.
This commit is contained in:
Gabe Moothart 2016-09-15 10:33:06 -07:00
parent 2468d440d9
commit e2ee3c5c15

View File

@ -1,7 +1,7 @@
interface Map<K, V> {
clear(): void;
delete(key: K): boolean;
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value?: V): this;
@ -17,19 +17,13 @@ declare var Map: MapConstructor;
interface ReadonlyMap<K, V> {
forEach(
callbackfn: (value: V, index: K, map: ReadonlyMap<K, V>) => void,
callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void,
thisArg?: any): void;
get(key: K): V|undefined;
has(key: K): boolean;
readonly size: number;
}
interface ReadonlyMapConstructor {
new<K, V>(entries?: [K, V][]): ReadonlyMap<K, V>;
readonly prototype: ReadonlyMap<any, any>;
}
declare var ReadonlyMap: ReadonlyMapConstructor;
interface WeakMap<K, V> {
delete(key: K): boolean;
get(key: K): V | undefined;
@ -48,7 +42,7 @@ interface Set<T> {
add(value: T): this;
clear(): void;
delete(value: T): boolean;
forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
has(value: T): boolean;
readonly size: number;
}
@ -61,18 +55,12 @@ interface SetConstructor {
declare var Set: SetConstructor;
interface ReadonlySet<T> {
forEach(callbackfn: (value: T, index: T, set: ReadonlySet<T>) => void, thisArg?: any):
forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any):
void;
has(value: T): boolean;
readonly size: number;
}
interface ReadonlySetConstructor {
new<T>(values?: T[]): ReadonlySet<T>;
readonly prototype: ReadonlySet<any>;
}
declare var ReadonlySet: ReadonlySetConstructor;
interface WeakSet<T> {
add(value: T): this;
delete(value: T): boolean;