---
url: https://lit-ui-router.dev/reference/ui-router-devtools/index/interfaces/Recorder.md
---
[ui-router-devtools](../../index.md) / [ui-router-devtools](../index.md) / Recorder

# Interface: Recorder

Defined in: [ui-router-devtools/src/recorder.ts:28](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L28)

A recording of one router's events, from [record](../functions/record.md).

## Properties

| Property | Modifier | Type | Description | Defined in |
| ------ | ------ | ------ | ------ | ------ |
|  `dropped` | `readonly` | `number` | Events discarded since recording began, by the ring buffer or by `clear()`. | [ui-router-devtools/src/recorder.ts:34](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L34) |
|  `events` | `readonly` | readonly [`RouterEvent`](../type-aliases/RouterEvent.md)\[] | The ring buffer's transition-scoped events, in order; the snapshots are in `session()` only. | [ui-router-devtools/src/recorder.ts:32](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L32) |
|  `routerId` | `readonly` | `string` | The router's id on this page, shared by every recorder of that router. | [ui-router-devtools/src/recorder.ts:30](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L30) |

## Methods

### clear()

```ts
clear(): void;
```

Defined in: [ui-router-devtools/src/recorder.ts:38](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L38)

Empties the ring buffer, counting its events in `dropped`; the snapshots stay.

#### Returns

`void`

***

### session()

```ts
session(redaction?): Session;
```

Defined in: [ui-router-devtools/src/recorder.ts:36](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L36)

The recording as a session file; `redaction` defaults to param keys without their values, messages kept.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `redaction?` | `Partial`<[`Redaction`](Redaction.md)> |

#### Returns

[`Session`](Session.md)

***

### stop()

```ts
stop(): void;
```

Defined in: [ui-router-devtools/src/recorder.ts:40](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L40)

Stops recording and detaches from the router.

#### Returns

`void`

***

### subscribe()

```ts
subscribe(listener): () => void;
```

Defined in: [ui-router-devtools/src/recorder.ts:42](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/recorder.ts#L42)

Calls `listener` with each event as it is recorded; the returned function unsubscribes.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `listener` | (`event`) => `void` |

#### Returns

() => `void`
