---
url: /api/kiln/interfaces/Events.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / Events

# Interface: Events

Per-system view of the event bus: `events.read(Hit)`, `events.emit(Hit, {...})`.

## Methods

### read()

```ts
read<T>(e): readonly T[];
```

Events of this type this reader hasn't seen yet. The array is reused; copy it to keep it.

#### Type Parameters

| Type Parameter |
| ------ |
| `T` |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `e` | [`EventType`](EventType.md)<`T`> |

#### Returns

readonly `T`\[]

***

### emit()

```ts
emit<T>(e, ...data): void;
```

#### Type Parameters

| Type Parameter |
| ------ |
| `T` |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `e` | [`EventType`](EventType.md)<`T`> |
| ...`data` | `T` *extends* `void` ? \[] : \[`T`] |

#### Returns

`void`
