diff --git a/lib/index.ts b/lib/index.ts index fc405af90..6a44065b8 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -3,7 +3,7 @@ import { Socket } from "./socket.js"; export { Socket }; export { SocketOptions } from "./socket.js"; export const protocol = Socket.protocol; -export { Transport } from "./transport.js"; +export { Transport, TransportError } from "./transport.js"; export { transports } from "./transports/index.js"; export { installTimerFunctions } from "./util.js"; export { parse } from "./contrib/parseuri.js"; diff --git a/lib/transport.ts b/lib/transport.ts index 14ab92977..09f8242b6 100644 --- a/lib/transport.ts +++ b/lib/transport.ts @@ -8,7 +8,7 @@ import { encode } from "./contrib/parseqs.js"; const debug = debugModule("engine.io-client:transport"); // debug() -class TransportError extends Error { +export class TransportError extends Error { public readonly type = "TransportError"; constructor(