-
Notifications
You must be signed in to change notification settings - Fork 296
Closed
Description
Describe the feature
As a developer using websockets, I want to come up with generic helper functions working with websocket peers (such as for #715). However, h3 doesn't re-export the type of peer, so I have to use introspection types:
type Peer = Parameters<NonNullable<Parameters<typeof defineWebSocketHandler>[0]["open"]>>[0]Not only this is cumbersome, but also it loses "genericness" of the original type.
I propose to re-export Peer directly from h3 (and some other involved types, e.g. Message, possibly others).
Additional information
- Would you be willing to help implement this feature?
tobiasdiez, PedarnOXX, mnlght03, rijkvanzanten and BartDelruetoto6038 and rijkvanzanten
Metadata
Metadata
Assignees
Labels
No labels