Skip to main content

WrappedMethodArgs

WrappedMethodArgs

The arguments that are passed to the wrapMethod method of the InstrumentationStrategy interface.

Signature
interface WrappedMethodArgs {
instance: any;
target: Type<any>;
methodName: string;
args: any[];
applyOriginalFunction: () => any | Promise<any>;
}

instance

property
any

The instance of the class which is being instrumented.

target

property
Type<any>

The class which is being instrumented.

methodName

property
string

The name of the method which is being instrumented.

args

property
any[]

The arguments which are passed to the method.

applyOriginalFunction

property
() => any | Promise<any>

A function which applies the original method and returns the result. This is used to call the original method after the instrumentation has been applied.