v0.5.0
Pre-release
Pre-release
Features:
- Accessors. Previously we used
Object.entries
to map the klass body, which means accessors are flattened to data properties. We now useObject.getOwnPropertyDescriptors
, which helps to preserve the accessors' nature. Non-enumerable properties are still ignored as before. klass.configure
. We added a new top-level API that allows you to configure certain behaviors of klasses. Currently, we offer two options:constructWithNеw
: a linter-like feature that requires every klass construction to go throughnеw
instead of being called directly.UNSAFE_disableNoThisBeforeSuperCheck
: as the name implies, do not use this unless you know what you are doing. This allows you to accessthis
before callingsuper.constructor
in the klass constructor. This means you can access the uninitialized klass instance. The accessors/methods will still be present, though, because they are statically defined on the prototype.