@typescript-package/descriptor-chain
Version:
A lightweight TypeScript library for property descriptor chain.
24 lines (23 loc) • 1.59 kB
TypeScript
import { DescriptorChainBase } from './descriptor-chain-base.abstract';
import { WrappedPropertyDescriptor } from '@typedly/descriptor';
/**
* @description The concrete class representing a chain of property descriptors.
* @export
* @abstract
* @class DescriptorChain
* @template [O=any] The type of the object that the property descriptors are associated with.
* @template {keyof O} [K=keyof O] The type of the property name in the object.
* @template {K extends keyof O ? O[K] : any} [V=K extends keyof O ? O[K] : any] The type of the value accessed by the property.
* @template {boolean} [A=boolean] The type of active property.
* @template {boolean} [N=boolean] The type of enabled property.
* @template {boolean} [C=boolean] The type of configurable property.
* @template {boolean} [E=boolean] The type of enumerable property.
* @template {WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>} [D=WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>] The type of wrapped property descriptor.
* @extends {DescriptorChainBase<O, K, V, A, N, C, E, D>}
*/
export declare class DescriptorChain<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 WrappedPropertyDescriptor<O, K, V, A, N, C, E, D> = WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>> extends DescriptorChainBase<O, K, V, A, N, C, E, D> {
/**
* @inheritdoc
*/
add(descriptor: D, current?: boolean): this;
}