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, options?: InvocationOptions): ValueOrPromise<InvocationResult>;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
context |
Context object | |
|
target |
object |
Target class (for static methods) or object (for instance methods) |
|
methodName |
string |
Method name |
|
args |
An array of argument values | |
|
options |
(Optional) Options for the invocation |
Returns: