package js.lib
Available on js
Reflect is a built-in object that provides methods for interceptable JavaScript operations. The methods are the same as those of proxy handlers. Reflect is not a function object, so it's not constructible.
Documentation Reflect by Mozilla Contributors, licensed under CC-BY-SA 2.5.
staticapply<T>(target:Function, thisArgument:{}, argumentsList:Array<Any>):TCalls a target function with arguments as specified by the args parameter. See also Function.prototype.apply().
staticconstruct<T, S>(target:Class<T>, argumentsList:Array<Any>, ?newTarget:Class<S>):TThe new operator as a function. Equivalent to calling new target(...args). Provides also the optional possibility to specify a different prototype.
staticdefineProperty(target:{}, propertyKey:String, attributes:ObjectPropertyDescriptor):BoolSimilar to Object.defineProperty(). Returns a Bool.
staticdeleteProperty(target:{}, propertyKey:String):BoolstaticdeleteProperty<T>(target:Array<T>, propertyKey:Int):BoolThe delete operator as a function. Equivalent to calling delete target[name].
staticget<T>(target:{}, propertyKey:String, ?receiver:{}):Null<T>staticget<T>(target:Array<T>, propertyKey:Int, ?receiver:{}):Null<T>A function that returns the value of properties.
staticgetOwnPropertyDescriptor(target:{}, propertyKey:String):Null<ObjectPropertyDescriptor>Similar to Object.getOwnPropertyDescriptor(). Returns a property descriptor of the given property if it exists on the object, undefined otherwise.
staticgetPrototypeOf<TProto>(target:{}):Null<TProto>Same as Object.getPrototypeOf().
statichas(target:{}, propertyKey:String):BoolThe in operator as function. Returns a boolean indicating whether an own or inherited property exists.
staticisExtensible(target:{}):BoolSame as Object.isExtensible().
staticownKeys(target:{}):Array<String>Returns an array of the target object's own (not inherited) property keys.
staticpreventExtensions(obj:{}):BoolSimilar to Object.preventExtensions(). Returns a Bool.
staticset<T>(target:{}, propertyKey:String, value:T, ?receiver:{}):Boolstaticset<T>(target:Array<T>, propertyKey:Int, value:T, ?receiver:{}):BoolA function that assigns values to properties. Returns a Bool that is true if the update was successful.
staticsetPrototypeOf<TProto>(target:{}, prototype:TProto):BoolA function that sets the prototype of an object.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/lib/Reflect.html