summaryrefslogtreecommitdiff
path: root/cli/dts/lib.es2015.collection.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.es2015.collection.d.ts')
-rw-r--r--cli/dts/lib.es2015.collection.d.ts63
1 files changed, 62 insertions, 1 deletions
diff --git a/cli/dts/lib.es2015.collection.d.ts b/cli/dts/lib.es2015.collection.d.ts
index dc154ca17..c2e7733ae 100644
--- a/cli/dts/lib.es2015.collection.d.ts
+++ b/cli/dts/lib.es2015.collection.d.ts
@@ -19,18 +19,38 @@ and limitations under the License.
interface Map<K, V> {
+
clear(): void;
+ /**
+ * @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
+ */
delete(key: K): boolean;
+ /**
+ * Executes a provided function once per each key/value pair in the Map, in insertion order.
+ */
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
+ /**
+ * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
+ * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
+ */
get(key: K): V | undefined;
+ /**
+ * @returns boolean indicating whether an element with the specified key exists or not.
+ */
has(key: K): boolean;
+ /**
+ * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
+ */
set(key: K, value: V): this;
+ /**
+ * @returns the number of elements in the Map.
+ */
readonly size: number;
}
interface MapConstructor {
new(): Map<any, any>;
- new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
readonly prototype: Map<any, any>;
}
declare var Map: MapConstructor;
@@ -43,9 +63,23 @@ interface ReadonlyMap<K, V> {
}
interface WeakMap<K extends object, V> {
+ /**
+ * Removes the specified element from the WeakMap.
+ * @returns true if the element was successfully removed, or false if it was not present.
+ */
delete(key: K): boolean;
+ /**
+ * @returns a specified element.
+ */
get(key: K): V | undefined;
+ /**
+ * @returns a boolean indicating whether an element with the specified key exists or not.
+ */
has(key: K): boolean;
+ /**
+ * Adds a new element with a specified key and value.
+ * @param key Must be an object.
+ */
set(key: K, value: V): this;
}
@@ -56,11 +90,28 @@ interface WeakMapConstructor {
declare var WeakMap: WeakMapConstructor;
interface Set<T> {
+ /**
+ * Appends a new element with a specified value to the end of the Set.
+ */
add(value: T): this;
+
clear(): void;
+ /**
+ * Removes a specified value from the Set.
+ * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
+ */
delete(value: T): boolean;
+ /**
+ * Executes a provided function once per each value in the Set object, in insertion order.
+ */
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
+ /**
+ * @returns a boolean indicating whether an element with the specified value exists in the Set or not.
+ */
has(value: T): boolean;
+ /**
+ * @returns the number of (unique) elements in Set.
+ */
readonly size: number;
}
@@ -77,8 +128,18 @@ interface ReadonlySet<T> {
}
interface WeakSet<T extends object> {
+ /**
+ * Appends a new object to the end of the WeakSet.
+ */
add(value: T): this;
+ /**
+ * Removes the specified element from the WeakSet.
+ * @returns Returns true if the element existed and has been removed, or false if the element does not exist.
+ */
delete(value: T): boolean;
+ /**
+ * @returns a boolean indicating whether an object exists in the WeakSet or not.
+ */
has(value: T): boolean;
}