From dff3c86285af4b33a370fa7f1e4cb34b4843a9b5 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Date: Mon, 10 Aug 2026 12:57:43 +0530 Subject: [PATCH] lib: fix two Reflect JSDoc defects Reflect.set documents target, propertyKey and receiver but skips value, the one parameter that says what is being assigned. Reflect.setPrototypeOf's summary reads "Sets the prototype of a specified object o to object proto or null", but this function's parameters are target and proto - there is no o. The wording appears to have been carried over from Object.setPrototypeOf(o, proto) in lib.es5.d.ts, which does have one. --- src/lib/es2015.reflect.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/es2015.reflect.d.ts b/src/lib/es2015.reflect.d.ts index 4f4ddc404f02f..fc61ad35e7803 100644 --- a/src/lib/es2015.reflect.d.ts +++ b/src/lib/es2015.reflect.d.ts @@ -105,6 +105,7 @@ declare namespace Reflect { * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. * @param target Object that contains the property on itself or in its prototype chain. * @param propertyKey Name of the property. + * @param value The value to assign to the property. * @param receiver The reference to use as the `this` value in the setter function, * if `target[propertyKey]` is an accessor property. */ @@ -117,7 +118,7 @@ declare namespace Reflect { function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; /** - * Sets the prototype of a specified object o to object proto or null. + * Sets the prototype of a specified object `target` to object `proto` or null. * @param target The object to change its prototype. * @param proto The value of the new prototype or null. * @return Whether setting the prototype was successful.