---
jsApi: true
title: "[F] $onEmit"

---
```ts
$onEmit(ctx): Promise< void >
```

Emitter main function.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `ctx` | `EmitContext`< `ProtobufEmitterOptions` \> |

## Returns

`Promise`< `void` \>
