---
title: "Type Example"
description: "Extracted example from ctx.on()"
---

# ctx.on()

## Type

```ts
on(eventName: string, handler: (event?: any) => void): void;
```
