Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/1.guide/3.peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ Direct access to the [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/

### `peer.context`

The context is an object that contains arbitrary information about the request.
The context is an object that contains arbitrary information about the request. You can augment the `PeerContext` interface to add your own properties.
Comment thread
pi0 marked this conversation as resolved.
Outdated

```ts
declare module "crossws" {
interface PeerContext {
customData?: string[];
}
}
```

> [!NOTE]
> context data can be volatile in some runtimes.
Expand Down