Previously, name was required as key to store property on internal __properties object and ended up being added boilerplate for every property that repeated the prototype key. Since this functionality is internal, the name isn't exposed and a unique id can be used instead which can then be used to determine the name, if necessary. To account for functions as default_value, type: 'Function' has been added, but it could affect directly set values. Instead, type has been removed, default_value is always evaluated if it's a function, and functions as default_value should be wrapped in a function. Finally prop_key is no longer available (__properties is always used).
Previously,
name
was required as key to store property on internal__properties
object and ended up being added boilerplate for every property that repeated the prototype key. Since this functionality is internal, the name isn't exposed and a unique id can be used instead which can then be used to determine thename
, if necessary. To account for functions asdefault_value
,type: 'Function'
has been added, but it could affect directly set values. Instead,type
has been removed,default_value
is always evaluated if it's a function, and functions asdefault_value
should be wrapped in a function. Finallyprop_key
is no longer available (__properties
is always used).Before:
After:
Changes:
name
: deprecated and will be removed in next versiontype
: removed, must wrap function default_valueprop_key
: removed, always__properties