mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-10 07:28:06 -05:00
refactor(sio): make Namespace._fns private (#5196)
Related: https://github.com/socketio/socket.io/issues/5179
This commit is contained in:
committed by
GitHub
parent
029e010901
commit
aead83560d
@@ -161,7 +161,7 @@ export class Namespace<
|
||||
SocketData
|
||||
>;
|
||||
|
||||
protected _fns: Array<
|
||||
private _fns: Array<
|
||||
(
|
||||
socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>,
|
||||
next: (err?: ExtendedError) => void,
|
||||
|
||||
@@ -67,7 +67,7 @@ export class ParentNamespace<
|
||||
): Namespace<ListenEvents, EmitEvents, ServerSideEvents, SocketData> {
|
||||
debug("creating child namespace %s", name);
|
||||
const namespace = new Namespace(this.server, name);
|
||||
this._fns.forEach((fn) => namespace.use(fn));
|
||||
this["_fns"].forEach((fn) => namespace.use(fn));
|
||||
this.listeners("connect").forEach((listener) =>
|
||||
namespace.on("connect", listener),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user