Page Contents

Home > @loopback/context > invokeMethodWithInterceptors

invokeMethodWithInterceptors() function

Invoke a method with the given context

Signature:

export declare function invokeMethodWithInterceptors(context: Context, target: object, methodName: string, args: InvocationArgs): ValueOrPromise<InvocationResult>;

Parameters

Parameter Type Description
context Context Context object
target object Target class (for static methods) or object (for instance methods)
methodName string Method name
args InvocationArgs An array of argument values

Returns:

ValueOrPromise<InvocationResult>