Reflect

external object Reflect(source)

Functions

Link copied to clipboard
fun <T : Any, A : JsTuple> construct(target: JsConstructorFunction<A, T>, argumentsList: A): T

Constructs the target with the elements of specified array as the arguments and the specified constructor as the new.target value.

fun <T : Any> construct(target: JsClass<T>, argumentsList: ReadonlyArray<Any?>): T
Link copied to clipboard
fun defineProperty(target: Any, propertyKey: PropertyKey, attributes: TypedPropertyDescriptor<*>): Boolean

Adds a property to an object, or modifies attributes of an existing property.

Link copied to clipboard
fun deleteProperty(target: Any, propertyKey: PropertyKey): Boolean

Removes a property from an object, equivalent to delete target[propertyKey], except it won't throw if target[propertyKey] is non-configurable.

Link copied to clipboard
fun get(target: Any, propertyKey: PropertyKey): Any?

Gets the property of target, equivalent to target[propertyKey] when receiver === target.

Link copied to clipboard

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.

Link copied to clipboard
fun getPrototypeOf(target: Any): Any?

Returns the prototype of an object.

Link copied to clipboard
fun has(target: Any, propertyKey: PropertyKey): Boolean

Equivalent to propertyKey in target.

Link copied to clipboard
fun isExtensible(target: Any): Boolean

Returns a value that indicates whether new properties can be added to an object.

Link copied to clipboard

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.

Link copied to clipboard

Prevents the addition of new properties to an object.

Link copied to clipboard
fun set(target: Any, propertyKey: PropertyKey, value: Any?): Boolean

Sets the property of target, equivalent to target[propertyKey] = value when receiver === target.

Link copied to clipboard
fun setPrototypeOf(target: Any, proto: Any?): Boolean

Sets the prototype of a specified object o to object proto or null.