UNPKG

@hgargg-0710/one

Version:

A tiny npm library purposed for providing beautiful solutions to frequent miniature (one-line/one-expression) tasks for various JS datatypes.

25 lines (24 loc) 1.18 kB
/** * Returns a get-set `PropertyDescriptor` */ export declare const GetSetDescriptor: (get: () => any, set: (v: any) => any) => PropertyDescriptor; /** * Returns a non-configurable, non-writable, non-enumerable constant property descriptor */ export declare const ConstDescriptor: (value: any) => PropertyDescriptor; /** * Returns a new property descriptor using corresponding flags */ export declare const Descriptor: (value: any, configurable?: boolean, writable?: boolean, enumerable?: boolean) => PropertyDescriptor; /** * Returns an enumerable property descriptor, otherwise defined by corresponding flags */ export declare const EnumerableDescriptor: (value: any, configurable?: boolean, writable?: boolean) => PropertyDescriptor; /** * Returns a configurable property descriptor, otherwise defined by corresponding flags */ export declare const ConfigurableDescriptor: (value: any, writable?: boolean, enumerable?: boolean) => PropertyDescriptor; /** * Returns a writable property descriptor, otherwise defined by the given flags. */ export declare const WritableDescriptor: (value: any, configurable?: boolean, enumerable?: boolean) => PropertyDescriptor;