Utils: `decorators`
Table of contents
Functions
Functions
configurable
▸ configurable(value
): (target
: unknown
, propertyKey
: string
, descriptor
: PropertyDescriptor
) => void
A decorator making changing the changing configurable property
Parameters
Name | Type |
---|---|
value | boolean |
Returns
fn
▸ (target
, propertyKey
, descriptor
): void
Parameters
Name | Type |
---|---|
target | unknown |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
Defined in
packages/utils/src/decorators.ts:15
enumerable
▸ enumerable(enabled?
): (target
: unknown
, propertyKey
: string
, descriptor
: PropertyDescriptor
) => void
A decorator for making a method enumerable or none-enumerable
Parameters
Name | Type | Default value |
---|---|---|
enabled | boolean | true |
Returns
fn
▸ (target
, propertyKey
, descriptor
): void
Parameters
Name | Type |
---|---|
target | unknown |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
Defined in
packages/utils/src/decorators.ts:26
locked
▸ locked(): (target
: unknown
, propertyKey
: string
, descriptor
: PropertyDescriptor
) => void
A decorator for locking down a method
Returns
fn
▸ (target
, propertyKey
, descriptor
): void
Parameters
Name | Type |
---|---|
target | unknown |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void