You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* - mode: 'shortest' (default) to stop at the shortest iterable | 'longest' to stop at the longest iterable | 'strict' to throw if iterables are not the same length;
22
-
* - padding: an object specifying padding values for each key when mode is 'longest'.
23
-
* @returns An iterator yielding objects with keys from the input iterables and values from the corresponding iterables.
22
+
* - padding: an iterable specifying padding values for each position when mode is 'longest'.
23
+
* @returns An iterator yielding arrays of values, collected one from each iterable.
* Returns a specified element from the Map object.
10
10
* If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the Map and returned.
11
+
* @param key - The key of the element to return.
12
+
* @param defaultValue - The value to insert if the key is not already associated with an element.
11
13
* @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed.
12
14
*/
13
15
getOrInsert(key: K,defaultValue: V): V;
14
16
/**
15
17
* Returns a specified element from the Map object.
16
18
* If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the Map and returned.
17
-
* @returns The element associated with the specific key, which will be the newly computed value if no element previously existed.
19
+
* @param key - The key of the element to return.
20
+
* @param callback - A function that computes the value to insert if the key is not already associated with an element. It will be passed the key as an argument.
21
+
* @returns The element associated with the specified key, which will be the newly computed value if no element previously existed.
* Returns a specified element from the WeakMap object.
25
29
* If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the WeakMap and returned.
30
+
* @param key - The key of the element to return.
31
+
* @param defaultValue - The value to insert if the key is not already associated with an element.
26
32
* @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed.
27
33
*/
28
34
getOrInsert(key: K,defaultValue: V): V;
29
35
/**
30
36
* Returns a specified element from the WeakMap object.
31
37
* If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the WeakMap and returned.
32
-
* @returns The element associated with the specific key, which will be the newly computed value if no element previously existed.
38
+
* @param key - The key of the element to return.
39
+
* @param callback - A function that computes the value to insert if the key is not already associated with an element. It will be passed the key as an argument.
40
+
* @returns The element associated with the specified key, which will be the newly computed value if no element previously existed.
0 commit comments