Method
decorate
(
decorators: (PropertyDecorator | MethodDecorator)[] | ClassDecorator[],
target: Object,
targetKey?: string | symbol,
descriptor?: PropertyDescriptor,
)
Source from the content-addressed store, hash-verified
| 161 | ): PropertyDescriptor | Function; |
| 162 | |
| 163 | decorate( |
| 164 | decorators: (PropertyDecorator | MethodDecorator)[] | ClassDecorator[], |
| 165 | target: Object, |
| 166 | targetKey?: string | symbol, |
| 167 | descriptor?: PropertyDescriptor, |
| 168 | ): PropertyDescriptor | Function { |
| 169 | if (targetKey) { |
| 170 | return Reflect.decorate( |
| 171 | <(PropertyDecorator | MethodDecorator)[]>decorators, |
| 172 | target, |
| 173 | targetKey, |
| 174 | descriptor, |
| 175 | ); |
| 176 | } else { |
| 177 | return Reflect.decorate(<ClassDecorator[]>decorators, <Function>target); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | metadata( |
| 182 | metadataKey: string, |
Tested by
no test coverage detected