diff options
Diffstat (limited to 'cli/tsc/dts/lib.es2015.collection.d.ts')
-rw-r--r-- | cli/tsc/dts/lib.es2015.collection.d.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cli/tsc/dts/lib.es2015.collection.d.ts b/cli/tsc/dts/lib.es2015.collection.d.ts index b97201ae4..f94c48543 100644 --- a/cli/tsc/dts/lib.es2015.collection.d.ts +++ b/cli/tsc/dts/lib.es2015.collection.d.ts @@ -60,7 +60,7 @@ interface ReadonlyMap<K, V> { readonly size: number; } -interface WeakMap<K extends object, V> { +interface WeakMap<K extends WeakKey, V> { /** * Removes the specified element from the WeakMap. * @returns true if the element was successfully removed, or false if it was not present. @@ -76,14 +76,14 @@ interface WeakMap<K extends object, V> { has(key: K): boolean; /** * Adds a new element with a specified key and value. - * @param key Must be an object. + * @param key Must be an object or symbol. */ set(key: K, value: V): this; } interface WeakMapConstructor { - new <K extends object = object, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>; - readonly prototype: WeakMap<object, any>; + new <K extends WeakKey = WeakKey, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>; + readonly prototype: WeakMap<WeakKey, any>; } declare var WeakMap: WeakMapConstructor; @@ -125,9 +125,9 @@ interface ReadonlySet<T> { readonly size: number; } -interface WeakSet<T extends object> { +interface WeakSet<T extends WeakKey> { /** - * Appends a new object to the end of the WeakSet. + * Appends a new value to the end of the WeakSet. */ add(value: T): this; /** @@ -136,13 +136,13 @@ interface WeakSet<T extends object> { */ delete(value: T): boolean; /** - * @returns a boolean indicating whether an object exists in the WeakSet or not. + * @returns a boolean indicating whether a value exists in the WeakSet or not. */ has(value: T): boolean; } interface WeakSetConstructor { - new <T extends object = object>(values?: readonly T[] | null): WeakSet<T>; - readonly prototype: WeakSet<object>; + new <T extends WeakKey = WeakKey>(values?: readonly T[] | null): WeakSet<T>; + readonly prototype: WeakSet<WeakKey>; } declare var WeakSet: WeakSetConstructor; |