@thi.ng/api
Version:
Common, generic types, interfaces & mixins
11 lines (10 loc) • 413 B
JavaScript
/**
* Method property decorator. Sets `configurable` flag of
* PropertyDescriptor to `false` (same as `@configurable(false)`).
* Intended to be used in combination with mixin decorators to enable
* partial implementations of mixed-in behaviors in target class and
* avoid them being overidden by mixed-in behaviour.
*/
export const nomixin = (_, __, descriptor) => {
descriptor.configurable = false;
};