🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
- 方法装饰器 ``` declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; ``` - 类装饰器 ``` declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void; ``` - 参数装饰器 ``` declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; ``` - 属性装饰器 ``` declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; ``` --- - TypedPropertyDesciptor ``` interface TypedPropertyDescriptor<T> { enumerable?: boolean; configurable?: boolean; writable?: boolean; value?: T; get?: () => T; set?: (value: T) => void; } ```