1 /*! *****************************************************************************
2 Copyright (c) Microsoft Corporation. All rights reserved.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the
5 License at http://www.apache.org/licenses/LICENSE-2.0
7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 MERCHANTABLITY OR NON-INFRINGEMENT.
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
18 /// <reference no-default-lib="true"/>
\r
21 declare namespace Reflect {
\r
23 * Calls the function with the specified object as the this value
\r
24 * and the elements of specified array as the arguments.
\r
25 * @param target The function to call.
\r
26 * @param thisArgument The object to be used as the this object.
\r
27 * @param argumentsList An array of argument values to be passed to the function.
\r
29 function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
\r
32 * Constructs the target with the elements of specified array as the arguments
\r
33 * and the specified constructor as the `new.target` value.
\r
34 * @param target The constructor to invoke.
\r
35 * @param argumentsList An array of argument values to be passed to the constructor.
\r
36 * @param newTarget The constructor to be used as the `new.target` object.
\r
38 function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: Function): any;
\r
41 * Adds a property to an object, or modifies attributes of an existing property.
\r
42 * @param target Object on which to add or modify the property. This can be a native JavaScript object
\r
43 * (that is, a user-defined object or a built in object) or a DOM object.
\r
44 * @param propertyKey The property name.
\r
45 * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
\r
47 function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
\r
50 * Removes a property from an object, equivalent to `delete target[propertyKey]`,
\r
51 * except it won't throw if `target[propertyKey]` is non-configurable.
\r
52 * @param target Object from which to remove the own property.
\r
53 * @param propertyKey The property name.
\r
55 function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
\r
58 * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`.
\r
59 * @param target Object that contains the property on itself or in its prototype chain.
\r
60 * @param propertyKey The property name.
\r
61 * @param receiver The reference to use as the `this` value in the getter function,
\r
62 * if `target[propertyKey]` is an accessor property.
\r
64 function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
\r
67 * Gets the own property descriptor of the specified object.
\r
68 * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
\r
69 * @param target Object that contains the property.
\r
70 * @param propertyKey The property name.
\r
72 function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined;
\r
75 * Returns the prototype of an object.
\r
76 * @param target The object that references the prototype.
\r
78 function getPrototypeOf(target: object): object | null;
\r
81 * Equivalent to `propertyKey in target`.
\r
82 * @param target Object that contains the property on itself or in its prototype chain.
\r
83 * @param propertyKey Name of the property.
\r
85 function has(target: object, propertyKey: PropertyKey): boolean;
\r
88 * Returns a value that indicates whether new properties can be added to an object.
\r
89 * @param target Object to test.
\r
91 function isExtensible(target: object): boolean;
\r
94 * Returns the string and symbol keys of the own properties of an object. The own properties of an object
\r
95 * are those that are defined directly on that object, and are not inherited from the object's prototype.
\r
96 * @param target Object that contains the own properties.
\r
98 function ownKeys(target: object): (string | symbol)[];
\r
101 * Prevents the addition of new properties to an object.
\r
102 * @param target Object to make non-extensible.
\r
103 * @return Whether the object has been made non-extensible.
\r
105 function preventExtensions(target: object): boolean;
\r
108 * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`.
\r
109 * @param target Object that contains the property on itself or in its prototype chain.
\r
110 * @param propertyKey Name of the property.
\r
111 * @param receiver The reference to use as the `this` value in the setter function,
\r
112 * if `target[propertyKey]` is an accessor property.
\r
114 function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
\r
117 * Sets the prototype of a specified object o to object proto or null.
\r
118 * @param target The object to change its prototype.
\r
119 * @param proto The value of the new prototype or null.
\r
120 * @return Whether setting the prototype was successful.
\r
122 function setPrototypeOf(target: object, proto: object | null): boolean;
\r