The object on which to define the property.
The name of the property to be defined or modified.
Optional
getProp: (() => V)The getter function to wire against the getter.
Optional
setProp: ((v: V) => void)The setter function to wire against the setter.
Optional
configurable: booleanCan the value be changed, defaults to true
Optional
enumerable: booleanShould this get property be enumerable, defaults to true.
The object that was passed to the function
It is recommended that you use objDefine instead objDefineAccessors as this internally creates the ObjDefinePropDescriptor definition based on your provided arguments. And only using a minimum set of functions reduces your overall bundle size.
Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded and executed in an ES3 container, providing basic IE8 compatibility.