We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generator should support leaner clients by specifying transport class upfront
Describe the solution you'd like Within components subset of client.ts to eliminate switch statements and import only the transport requested.
Describe alternatives you've considered None
Additional context Here is the switch statement and import to be removed
import { RequestManager, PostMessageWindowTransport, PostMessageIframeTransport, WebSocketTransport, HTTPTransport, HTTPTransportOptions, Transport, Client, JSONRPCError } from "@open-rpc/client-js"; switch (type) { case 'injected': this.transport = injected; break; case 'http': case 'https': this.transport = new HTTPTransport((protocol || type) + "://" + host + ":" + port + path ); break; case 'websocket': this.transport = new WebSocketTransport((protocol || "ws://") + host + ":" + port + path); break; case 'postmessageiframe': this.transport = new PostMessageIframeTransport(protocol + "://" + host + ":" + port + path); break; case 'postmessagewindow': this.transport = new PostMessageWindowTransport(protocol + "://" + host + ":" + port + path); break; default: throw new Error("unsupported transport"); break; } ```
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Generator should support leaner clients by specifying transport class upfront
Describe the solution you'd like
Within components subset of client.ts to eliminate switch statements and import only the transport requested.
Describe alternatives you've considered
None
Additional context
Here is the switch statement and import to be removed
The text was updated successfully, but these errors were encountered: