# once

Modifies an `EventHandler` to run only once.

## Signatures

```ts
export declare function once<Ev extends Event, E = never, R = never>(handler: EventHandler<Ev, E, R>): EventHandler<Ev, E, R>;
```

## Why

`once` uses listener metadata and delegated-source cleanup rather than local
component state.

## Ownership and lifetime

The first matching event disposes the registration; closing the mount Scope
also removes it if it has not fired.

## Examples

```ts
import * as EventHandler from "@typed/template/EventHandler"

const handler = EventHandler.make((event) => {
  console.log("This will only run once")
})

const onceHandler = EventHandler.once(handler)
```
