UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

52 lines (37 loc) 2.46 kB
--- lang: en title: 'API docs: context.invocationcontext' 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.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) ## InvocationContext class InvocationContext represents the context to invoke interceptors for a method. The context can be used to access metadata about the invocation as well as other dependencies. <b>Signature:</b> ```typescript export declare class InvocationContext extends Context ``` <b>Extends:</b> [Context](./context.context.md) ## Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [(constructor)(parent, target, methodName, args, source)](./context.invocationcontext._constructor_.md) | | Construct a new instance of <code>InvocationContext</code> | ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [args](./context.invocationcontext.args.md) | | [InvocationArgs](./context.invocationargs.md) | | | [description](./context.invocationcontext.description.md) | | string | Description of the invocation | | [methodName](./context.invocationcontext.methodname.md) | | string | | | [source?](./context.invocationcontext.source.md) | | [InvocationSource](./context.invocationsource.md)<!-- -->&lt;unknown&gt; \| undefined | <i>(Optional)</i> | | [target](./context.invocationcontext.target.md) | | object | | | [targetClass](./context.invocationcontext.targetclass.md) | | Function | The target class, such as <code>OrderController</code> | | [targetName](./context.invocationcontext.targetname.md) | | string | The target name, such as <code>OrderController.prototype.cancelOrder</code> | ## Methods | Method | Modifiers | Description | | --- | --- | --- | | [assertMethodExists()](./context.invocationcontext.assertmethodexists.md) | | Assert the method exists on the target. An error will be thrown if otherwise. | | [invokeTargetMethod(options)](./context.invocationcontext.invoketargetmethod.md) | | Invoke the target method with the given context | | [toString()](./context.invocationcontext.tostring.md) | | |