---
lang: en
title: 'API docs: context.invocationcontext._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.invocationcontext._constructor_.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [InvocationContext](./context.invocationcontext.md) &gt; [(constructor)](./context.invocationcontext._constructor_.md)

## InvocationContext.(constructor)

Construct a new instance of `InvocationContext`

**Signature:**

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

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

parent


</td><td>

[Context](./context.context.md)


</td><td>

Parent context, such as the RequestContext


</td></tr>
<tr><td>

target


</td><td>

object


</td><td>

Target class (for static methods) or prototype/object (for instance methods)


</td></tr>
<tr><td>

methodName


</td><td>

string


</td><td>

Method name


</td></tr>
<tr><td>

args


</td><td>

[InvocationArgs](./context.invocationargs.md)


</td><td>

An array of arguments


</td></tr>
<tr><td>

source


</td><td>

[InvocationSource](./context.invocationsource.md)<!-- -->&lt;unknown&gt; \| undefined


</td><td>

_(Optional)_


</td></tr>
</tbody></table>

