diff --git a/src/index.ts b/src/index.ts index 918155e..d62f03b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -173,7 +173,8 @@ export class ZilaServer { return this._status; } - private _clients: Array = []; + + private _clients: Array = []; public get clients() { return this._clients; @@ -312,7 +313,7 @@ export class ZilaServer { req.headers.cookie ? new Map(Object.entries(parseCookie(req.headers.cookie))) : new Map() ); - this._clients.push(zilaSocket); + this._clients.push(zilaSocket as T); if (this.serverEvents.onClientConnect) { for (const cb of this.serverEvents.onClientConnect) { diff --git a/test/index.test.ts b/test/index.test.ts index 49e0c20..4569d5f 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -29,7 +29,7 @@ class MyClient extends ZilaClient { describe("Non-Secure", () => { let client: ZilaConnection; let server: ZilaServer; - let clientSocket: ZilaClient; + let clientSocket: MyClient; beforeAll(async () => { server = new ZilaServer({