Page Contents

Home > @loopback/context > InvocationContext > (constructor)

InvocationContext.(constructor)

Construct a new instance of InvocationContext

Signature:

constructor(parent: Context, target: object, methodName: string, args: InvocationArgs, source?: InvocationSource<unknown> | undefined);

Parameters

Parameter Type Description
parent [Context](/doc/en/lb4/apidocs.context.context.html) Parent context, such as the RequestContext
target object Target class (for static methods) or prototype/object (for instance methods)
methodName string Method name
args [InvocationArgs](/doc/en/lb4/apidocs.context.invocationargs.html) An array of arguments
source [InvocationSource](/doc/en/lb4/apidocs.context.invocationsource.html)<unknown> \| undefined _(Optional)_