refactor(eio-client): improve transports type (#5188)

Related: https://github.com/socketio/socket.io/issues/5187
This commit is contained in:
nayounsang
2024-09-14 15:17:36 +09:00
committed by GitHub
parent 5d9a2d5544
commit b5ccfd4838

View File

@@ -85,7 +85,9 @@ export interface SocketOptions {
*
* @default ['polling','websocket', 'webtransport']
*/
transports?: string[] | TransportCtor[];
transports?:
| ("polling" | "websocket" | "webtransport" | string)[]
| TransportCtor[];
/**
* Whether all the transports should be tested, instead of just the first one.