InstrumentationStrategy
InstrumentationStrategy
This interface is used to define a strategy for instrumenting methods of classes which are decorated with the Instrument decorator.
Signature
interface InstrumentationStrategy extends InjectableStrategy {
wrapMethod(args: WrappedMethodArgs): any;
}
- Extends:
InjectableStrategy
wrapMethod
method
(args: WrappedMethodArgs) => any
When a method of an instrumented class is called, it will be wrapped (by means of
a Proxy) and this method will be called. The applyOriginalFunction
function
will apply the original method and return the result.