mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
{Map, WeakMap}.set and {Set, WeakSet}.add return this.
This commit is contained in:
parent
72c19ec806
commit
73590f4fb1
10
src/lib/es2015.collection.d.ts
vendored
10
src/lib/es2015.collection.d.ts
vendored
@ -4,7 +4,7 @@ interface Map<K, V> {
|
||||
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
|
||||
get(key: K): V | undefined;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): Map<K, V>;
|
||||
set(key: K, value?: V): this;
|
||||
readonly size: number;
|
||||
}
|
||||
|
||||
@ -20,8 +20,7 @@ interface WeakMap<K, V> {
|
||||
delete(key: K): boolean;
|
||||
get(key: K): V | undefined;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
|
||||
set(key: K, value?: V): this;
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
@ -32,7 +31,7 @@ interface WeakMapConstructor {
|
||||
declare var WeakMap: WeakMapConstructor;
|
||||
|
||||
interface Set<T> {
|
||||
add(value: T): 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;
|
||||
@ -48,11 +47,10 @@ interface SetConstructor {
|
||||
declare var Set: SetConstructor;
|
||||
|
||||
interface WeakSet<T> {
|
||||
add(value: T): WeakSet<T>;
|
||||
add(value: T): this;
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user