OpDecorator
Ƭ OpDecorator<T>: (value: T, context: ClassMethodDecoratorContext) => T | void & (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void
Helper type for decorators
This represents a decorator function that can be used with both legacy and Stage 3 decorators.
For Stage 3 decorators:
target: The function being decorated (T)
context: MethodDecoratorContext
For legacy decorators:
target: The prototype (instance methods) or constructor (static methods)
propertyKey: The method name
descriptor: The property descriptor containing the method
Type parameters
| Name | Type |
|---|---|
T | extends (…args: any[]) => any |