-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Is your feature request related to a problem? Please describe.
WebSocketTransport.ts does not accept a protocols option to the constructor of WS
Describe the solution you'd like
constructor(uri: string, protocols?: string | string[]) {
super();
this.uri = uri;
this.connection = new WS(uri, protocols);
}
Describe alternatives you've considered
- subclass Transport - but this class is not exposed in v2.0.0 (in v1.8.1 - this could be hacked by import from
@open-rpc/client-js/build/transports/Transport - subclass WebSocketTransport - this works but there will be a bogus WS connection due to
WS(url, protocols === undefined)insuper(); in the subclass the second call toWS(url, protocols)will succeed
Additional context
In v2.0.0 the workaround is to hack using node_modules/@open-rpc/client-js/dist/transports/Transport
Metadata
Metadata
Assignees
Labels
No labels