@react-mvi/di
Version:
Dependency injection module for React MVI.
62 lines (61 loc) • 1.67 kB
TypeScript
/**
* @fileoverview インターセプタ内で使用されるメソッドの抽象クラス定義
* @author Taketoshi Aono
*/
/**
* メソッド呼び出しの抽象表現
*/
export declare class MethodInvocation {
private method;
private context;
private args;
private contextName;
private propertyKey;
/**
* @param method 関数本体
* @param context 呼び出しコンテキスト
* @param args 引数
* @param contextName 実行コンテキストの名前
* @param propertyKey 呼び出しプロパティ名
*/
constructor(method: Function, context: any, args: any[], contextName: string, propertyKey: string);
/**
* 関数呼び出しを実行する
* @returns 実行結果
*/
proceed(): any;
/**
* 引数を取得する
* @returns 引数リスト
*/
getArguments(): any[];
/**
* 実行コンテキストを取得する
* @returns 実行コンテキスト
*/
getContext(): any;
/**
* インスタンス名を取得する
* @returns string
*/
getInstanceName(): string;
/**
* プロパティ名を取得する
* @returns string
*/
getPropertyName(): string;
/**
* コンテキスト名とプロパティ名を繋いだ名前を返す。
*/
getFullQualifiedName(): string;
}
/**
* インターセプタのインターフェース
*/
export interface MethodProxy {
/**
* インターセプタを呼び出す。
* @param methodInvocation インターセプトしたメソッドの抽象表現
*/
invoke(methodInvocation: MethodInvocation): any;
}