From dde504a01600206532e332c5ef66f81fbd6b501a Mon Sep 17 00:00:00 2001 From: Vedansh Shetti Date: Tue, 1 Sep 2026 21:12:24 +0200 Subject: [PATCH 1/2] chore: add missing @param JSDoc to ES2015 Map methods --- tsc/internal/bundled/libs/lib.es2015.collection.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tsc/internal/bundled/libs/lib.es2015.collection.d.ts b/tsc/internal/bundled/libs/lib.es2015.collection.d.ts index 225e918b76477..62992c762d1f8 100644 --- a/tsc/internal/bundled/libs/lib.es2015.collection.d.ts +++ b/tsc/internal/bundled/libs/lib.es2015.collection.d.ts @@ -20,24 +20,31 @@ interface Map { */ clear(): void; /** + * @param key The key of the element to be removed. * @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. + * @param callbackfn Callback Function that is to be executed on each key/value pair in the Map. */ forEach(callbackfn: (value: V, key: K, map: Map) => 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. + * @param key The key of the element to be retrieved. * @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. + * Checks whether element with specified key exists. + * @param key The key of said element. + * @returns Boolean value 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. + * @param key Key of element that is to be added / updated. + * @param value New value for element. */ set(key: K, value: V): this; /** From bc73ee6db4e3d79202d483f1c53ff4220b23b718 Mon Sep 17 00:00:00 2001 From: Vedansh Shetti Date: Tue, 1 Sep 2026 21:32:49 +0200 Subject: [PATCH 2/2] chore: add missing @param JSDoc to ES2015 WeakMap methods --- tsc/internal/bundled/libs/lib.es2015.collection.d.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tsc/internal/bundled/libs/lib.es2015.collection.d.ts b/tsc/internal/bundled/libs/lib.es2015.collection.d.ts index 62992c762d1f8..1afa5fbcd34a1 100644 --- a/tsc/internal/bundled/libs/lib.es2015.collection.d.ts +++ b/tsc/internal/bundled/libs/lib.es2015.collection.d.ts @@ -69,21 +69,25 @@ interface ReadonlyMap { interface WeakMap { /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. + * @param key The key of the element to be removed from the WeakMap. + * @returns true if an element in the WeakMap existed and has been removed, or false if the element does not exist. */ delete(key: K): boolean; /** + * Returns a specified element from the WeakMap. 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 WeakMap. + * @param key The key of the element to be retrieved. * @returns a specified element. */ get(key: K): V | undefined; /** - * @returns a boolean indicating whether an element with the specified key exists or not. + * @param key The key of said element. + * @returns A boolean value 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 or symbol. + * @param value New value for element. */ set(key: K, value: V): this; }