OpDecorator
T>: (value: T, context: ClassMethodDecoratorContext) => T | void & (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void
데코레이터용 헬퍼 유형
이는 레거시 데코레이터와 Stage 3 데코레이터 모두에 사용할 수 있는 데코레이터 함수를 나타냅니다.
Stage 3 데코레이터의 경우:
target: 데코레이트되는 함수 (T)
context: MethodDecoratorContext
레거시 데코레이터의 경우:
target: 프로토타입(인스턴스 방법) 또는 생성자(정적 방법)
propertyKey: 방법 이름
descriptor: 방법을 포함하는 속성 설명자
타입 매개변수
| 이름 | 유형 |
|---|---|
T | extends (…args: any[]) => any |