diff --git a/src/lib/es2015.reflect.d.ts b/src/lib/es2015.reflect.d.ts index ed968dc0b1740..4f4ddc404f02f 100644 --- a/src/lib/es2015.reflect.d.ts +++ b/src/lib/es2015.reflect.d.ts @@ -6,6 +6,11 @@ declare namespace Reflect { * @param thisArgument The object to be used as the this object. * @param argumentsList An array of argument values to be passed to the function. */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; /** @@ -15,6 +20,11 @@ declare namespace Reflect { * @param argumentsList An array of argument values to be passed to the constructor. * @param newTarget The constructor to be used as the `new.target` object. */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; /** @@ -41,7 +51,11 @@ declare namespace Reflect { * @param receiver The reference to use as the `this` value in the getter function, * if `target[propertyKey]` is an accessor property. */ - function get(target: object, propertyKey: PropertyKey, receiver?: any): any; + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; /** * Gets the own property descriptor of the specified object. @@ -49,7 +63,10 @@ declare namespace Reflect { * @param target Object that contains the property. * @param propertyKey The property name. */ - function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined; + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; /** * Returns the prototype of an object. @@ -91,6 +108,12 @@ declare namespace Reflect { * @param receiver The reference to use as the `this` value in the setter function, * if `target[propertyKey]` is an accessor property. */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; /**