Skip to content

Latest commit

 

History

History
125 lines (123 loc) · 4.47 KB

es2015.reflect.d.ts.md

File metadata and controls

125 lines (123 loc) · 4.47 KB

es2015.reflect.d.ts Diffs

Index: es2015.reflect.d.ts
===================================================================
--- es2015.reflect.d.ts
+++ es2015.reflect.d.ts
@@ -10,14 +10,8 @@
     target: (this: T, ...args: A) => R,
     thisArgument: T,
     argumentsList: Readonly<A>,
   ): R;
-  function apply(
-    target: Function,
-    thisArgument: any,
-    argumentsList: ArrayLike<any>,
-  ): any;
-
   /**
    * Constructs the target with the elements of specified array as the arguments
    * and the specified constructor as the `new.target` value.
    * @param target The constructor to invoke.
@@ -28,14 +22,8 @@
     target: new (...args: A) => R,
     argumentsList: Readonly<A>,
     newTarget?: new (...args: any) => any,
   ): R;
-  function construct(
-    target: Function,
-    argumentsList: ArrayLike<any>,
-    newTarget?: Function,
-  ): any;
-
   /**
    * Adds a property to an object, or modifies attributes of an existing property.
    * @param target Object on which to add or modify the property. This can be a native JavaScript object
    *        (that is, a user-defined object or a built in object) or a DOM object.
@@ -46,30 +34,27 @@
     target: object,
     propertyKey: PropertyKey,
     attributes: PropertyDescriptor & ThisType<any>,
   ): boolean;
-
   /**
    * Removes a property from an object, equivalent to `delete target[propertyKey]`,
    * except it won't throw if `target[propertyKey]` is non-configurable.
    * @param target Object from which to remove the own property.
    * @param propertyKey The property name.
    */
   function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
-
   /**
    * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`.
    * @param target Object that contains the property on itself or in its prototype chain.
    * @param propertyKey The property name.
    * @param receiver The reference to use as the `this` value in the getter function,
    *        if `target[propertyKey]` is an accessor property.
    */
-  function get<T extends object, P extends PropertyKey>(
+  function get<T, P extends PropertyKey>(
     target: T,
     propertyKey: P,
     receiver?: unknown,
-  ): P extends keyof T ? T[P] : any;
-
+  ): P extends keyof T ? T[P] : unknown;
   /**
    * Gets the own property descriptor of the specified object.
    * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
    * @param target Object that contains the property.
@@ -78,42 +63,36 @@
   function getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(
     target: T,
     propertyKey: P,
   ): TypedPropertyDescriptor<P extends keyof T ? T[P] : any> | undefined;
-
   /**
    * Returns the prototype of an object.
    * @param target The object that references the prototype.
    */
   function getPrototypeOf(target: object): object | null;
-
   /**
    * Equivalent to `propertyKey in target`.
    * @param target Object that contains the property on itself or in its prototype chain.
    * @param propertyKey Name of the property.
    */
   function has(target: object, propertyKey: PropertyKey): boolean;
-
   /**
    * Returns a value that indicates whether new properties can be added to an object.
    * @param target Object to test.
    */
   function isExtensible(target: object): boolean;
-
   /**
    * Returns the string and symbol keys of the own properties of an object. The own properties of an object
    * are those that are defined directly on that object, and are not inherited from the object's prototype.
    * @param target Object that contains the own properties.
    */
   function ownKeys(target: object): (string | symbol)[];
-
   /**
    * Prevents the addition of new properties to an object.
    * @param target Object to make non-extensible.
    * @return Whether the object has been made non-extensible.
    */
   function preventExtensions(target: object): boolean;
-
   /**
    * 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.
@@ -131,9 +110,8 @@
     propertyKey: PropertyKey,
     value: any,
     receiver?: any,
   ): boolean;
-
   /**
    * Sets the prototype of a specified object o to object proto or null.
    * @param target The object to change its prototype.
    * @param proto The value of the new prototype or null.