---
lang: en
title: 'API docs: context.context.emitevent'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.context.emitevent.html
---

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

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Context](./context.context.md) &gt; [emitEvent](./context.context.emitevent.md)

## Context.emitEvent() method

A strongly-typed method to emit context events

<b>Signature:</b>

```typescript
emitEvent<T extends ContextEvent>(type: string, event: T): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  type | <code>string</code> |  |
|  event | <code>T</code> |  |

<b>Returns:</b>

`void`


