From d1228d9799024c7b5af2868651cbdf3ac04de4c9 Mon Sep 17 00:00:00 2001 From: Marc Ruiz Date: Fri, 25 Oct 2024 21:52:07 +0200 Subject: [PATCH] fix(ws): use new types for ws library --- src/use/ws.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/use/ws.ts b/src/use/ws.ts index 22ab6975..1572431a 100644 --- a/src/use/ws.ts +++ b/src/use/ws.ts @@ -1,5 +1,5 @@ import type * as http from 'http'; -import type * as ws from 'ws'; +import type { WebSocket, WebSocketServer } from 'ws'; import { handleProtocols, makeServer, ServerOptions } from '../server'; import { DEPRECATED_GRAPHQL_WS_PROTOCOL, @@ -10,8 +10,7 @@ import { import { limitCloseReason } from '../utils'; // for nicer documentation -type WebSocket = typeof ws.prototype; -type WebSocketServer = ws.Server; +export type { WebSocket, WebSocketServer }; /** * The extra that will be put in the `Context`.