---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/functions/event.md'
---

# Function: event()

```ts
function event<P>(): EventDescriptor<P>;
```

Defined in: [src/batteries/isolation/types.ts:141](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/types.ts#L141)

Declare an unsolicited event channel on an isolated service's spec — the guest-side implementation
factory receives an `emit(payload)` function for this channel; the host subscribes via
`service.on(channel, fn)`. Events are never implemented by the guest's per-method object (there is no
"handler" to provide) — they are purely an outbound notification channel.

## Type Parameters

| Type Parameter | Description             |
| -------------- | ----------------------- |
| `P`            | The event payload type. |

## Returns

[`EventDescriptor`](../interfaces/EventDescriptor.md)<`P`>
