---
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`

<b>Signature:</b>

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  parent | [Context](./context.context.md) | 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](./context.invocationargs.md) | An array of arguments |
|  source | [InvocationSource](./context.invocationsource.md)<!-- -->&lt;unknown&gt; \| undefined |  |


