Skip to content

Latest commit

 

History

History
70 lines (65 loc) · 2.4 KB

es2015.proxy.d.ts.md

File metadata and controls

70 lines (65 loc) · 2.4 KB

es2015.proxy.d.ts Diffs

Index: es2015.proxy.d.ts
===================================================================
--- es2015.proxy.d.ts
+++ es2015.proxy.d.ts
@@ -2,16 +2,15 @@
   /**
    * A trap method for a function call.
    * @param target The original callable object which is being proxied.
    */
-  apply?(target: T, thisArg: any, argArray: any[]): any;
-
+  apply?(target: T, thisArg: unknown, argArray: unknown[]): any;
   /**
    * A trap for the `new` operator.
    * @param target The original object which is being proxied.
    * @param newTarget The constructor that was originally called.
    */
-  construct?(target: T, argArray: any[], newTarget: Function): object;
+  construct?(target: T, argArray: unknown[], newTarget: unknown): object;
 
   /**
    * A trap for `Object.defineProperty()`.
    * @param target The original object which is being proxied.
@@ -29,16 +28,15 @@
    * @param p The name or `Symbol` of the property to delete.
    * @returns A `Boolean` indicating whether or not the property was deleted.
    */
   deleteProperty?(target: T, p: string | symbol): boolean;
-
   /**
    * A trap for getting a property value.
    * @param target The original object which is being proxied.
    * @param p The name or `Symbol` of the property to get.
    * @param receiver The proxy or an object that inherits from the proxy.
    */
-  get?(target: T, p: string | symbol, receiver: any): any;
+  get?(target: T, p: string | symbol, receiver: unknown): any;
 
   /**
    * A trap for `Object.getOwnPropertyDescriptor()`.
    * @param target The original object which is being proxied.
@@ -78,17 +76,21 @@
    * A trap for `Object.preventExtensions()`.
    * @param target The original object which is being proxied.
    */
   preventExtensions?(target: T): boolean;
-
   /**
    * A trap for setting a property value.
    * @param target The original object which is being proxied.
    * @param p The name or `Symbol` of the property to set.
    * @param receiver The object to which the assignment was originally directed.
    * @returns A `Boolean` indicating whether or not the property was set.
    */
-  set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
+  set?(
+    target: T,
+    p: string | symbol,
+    value: unknown,
+    receiver: unknown,
+  ): boolean;
 
   /**
    * A trap for `Object.setPrototypeOf()`.
    * @param target The original object which is being proxied.