Optional
changedA function called when the property value has changed.
This will be invoked when the property value is changed and the comparator indicates that the old value is not equal to the new value.
This will not be called for the initial default value.
Optional
coerceA function used to coerce a supplied value into the final value.
This will be called whenever the property value is changed, or when the property is explicitly coerced. The return value will be used as the final value of the property.
This will not be called for the initial default value.
Optional
compareA function used to compare two values for equality.
This is called to determine if the property value has changed.
It should return true
if the given values are equivalent, or
false
if they are different.
If this is not provided, it defaults to the ===
operator.
A factory function used to create the default property value.
This will be called whenever the property value is required, but has not yet been set for a given owner.
The human readable name for the property.
By convention, this should be the same as the name used to define the public accessor for the property value.
This does not have an effect on the property lookup behavior. Multiple properties may share the same name without conflict.
The options object used to initialize an attached property.