UNPKG

@typescript-package/wrapped-descriptor

Version:

A lightweight TypeScript library for wrapped property descriptor.

19 lines (18 loc) 1.49 kB
import { PlainWrappedDescriptorBase } from './plain-wrapped-descriptor-base.abstract'; import { WrappedPropertyDescriptor } from '@typedly/descriptor'; /** * @description The plain wrapped descriptor class. * @export * @class PlainWrappedDescriptor * @template [O=any] The type of the object to define the descriptor on. * @template {keyof O} [K=keyof O] The key of the object to define the descriptor on. * @template {K extends keyof O ? O[K] : any} [V=K extends keyof O ? O[K] : any] The value type of the key in the object. * @template {boolean} [A=boolean] The type of active. * @template {boolean} [N=boolean] The type of enabled. * @template {boolean} [C=boolean] The type of configurable. * @template {boolean} [E=boolean] The type of enumerable. * @template {PlainWrappedDescriptorBase<O, K, V, A, N, C, E, D> | PropertyDescriptor} [D=PlainWrappedDescriptorBase<O, K, V, A, N, C, E, any>] */ export declare class PlainWrappedDescriptor<O = any, K extends keyof O = keyof O, V extends K extends keyof O ? O[K] : any = K extends keyof O ? O[K] : any, A extends boolean = boolean, N extends boolean = boolean, C extends boolean = boolean, E extends boolean = boolean, D extends PlainWrappedDescriptorBase<O, K, V, A, N, C, E, D> | PropertyDescriptor = PlainWrappedDescriptorBase<O, K, V, A, N, C, E, any>> extends PlainWrappedDescriptorBase<O, K, V, A, N, C, E, D> { constructor(object: O, key: K, descriptor: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>); }