We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PeerContext
1 parent c33d867 commit 416e593Copy full SHA for 416e593
docs/1.guide/3.peer.md
@@ -39,6 +39,16 @@ Direct access to the [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/
39
40
The context is an object that contains arbitrary information about the request.
41
42
+You can augment the `PeerContext` interface types to add your properties.
43
+
44
+```ts
45
+declare module "crossws" {
46
+ interface PeerContext {
47
+ customData?: string[];
48
+ }
49
+}
50
+```
51
52
> [!NOTE]
53
> context data can be volatile in some runtimes.
54
0 commit comments