Skip to content

Commit

Permalink
upgrade deps, fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecsl committed Feb 21, 2025
1 parent 0007605 commit 5e19d78
Show file tree
Hide file tree
Showing 3 changed files with 1,850 additions and 1,738 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist/
example/
tsconfig.json
babel.config.js
jest.config.js
6 changes: 3 additions & 3 deletions src/server/wsJsonServer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ws from "ws";
import { WebSocketServer } from "ws";
import { Server as HttpsServer } from "https";
import { IncomingMessage, Server as HttpServer, ServerResponse } from "http";
import { WsJsonClient } from "../client/wsJsonClient.js";
Expand All @@ -24,15 +24,15 @@ type DefaultHttpServer = HttpServer<
* arguments to pass to the method. The response is then forwarded back to the client as a JSON string.
*/
export default class WsJsonServer implements Disposable {
private readonly wss: ws.Server<typeof ws, typeof IncomingMessage>;
private readonly wss: WebSocketServer;
private proxies: WsJsonServerProxy[] = [];

constructor(
private readonly wsJsonClientFactory: () => WsJsonClient,
private readonly server: DefaultHttpsServer | DefaultHttpServer,
private readonly port = DEFAULT_PORT
) {
this.wss = new ws.WebSocketServer({ server: this.server });
this.wss = new WebSocketServer({ server: this.server });
}

start() {
Expand Down
Loading

0 comments on commit 5e19d78

Please sign in to comment.