Skip to content

Commit ad2cc9a

Browse files
committed
Import type WebSocketServer directly from 'ws'
1 parent 0c0eb49 commit ad2cc9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/use/ws.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type * as http from 'http';
22
import type WebSocket from 'ws';
3+
import type { WebSocketServer } from 'ws';
34
import {
45
CloseCode,
56
ConnectionInitMessage,
@@ -9,10 +10,9 @@ import {
910
import { handleProtocols, makeServer, ServerOptions } from '../server';
1011
import { limitCloseReason } from '../utils';
1112

12-
export type WebSocketServer = WebSocket.Server;
1313

1414
// for nicer documentation
15-
export type { WebSocket };
15+
export type { WebSocket, WebSocketServer };
1616

1717
/**
1818
* The extra that will be put in the `Context`.

0 commit comments

Comments
 (0)