From 96dceda3f711e1e12fbef6bcf844f045190cea30 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Mon, 23 Jan 2023 09:15:00 +0100 Subject: [PATCH] refactor: export DisconnectReason type Related: https://github.com/socketio/socket.io/issues/4556 --- lib/index.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 0a40057003..4211572896 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -26,7 +26,7 @@ import { import * as parser from "socket.io-parser"; import type { Encoder } from "socket.io-parser"; import debugModule from "debug"; -import { Socket } from "./socket"; +import { Socket, DisconnectReason } from "./socket"; import type { BroadcastOperator, RemoteSocket } from "./broadcast-operator"; import { EventsMap, @@ -1096,5 +1096,12 @@ module.exports.Server = Server; module.exports.Namespace = Namespace; module.exports.Socket = Socket; -export { Socket, ServerOptions, Namespace, BroadcastOperator, RemoteSocket }; +export { + Socket, + DisconnectReason, + ServerOptions, + Namespace, + BroadcastOperator, + RemoteSocket, +}; export { Event } from "./socket";