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: プロトタイプ (インスタンスmethod) またはコンストラクタ (static method)
propertyKey: method名
descriptor: method を含むプロパティディスクリプタ
型パラメーター
| 名 | タイプ |
|---|---|
T | extends (…args: any[]) => any |