Skip to content

Commit

Permalink
fix(use/ws): Correct usage of WS types (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruizmarc authored Nov 5, 2024
1 parent 9cbeee0 commit 2c603ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/use/ws.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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`.
Expand Down

0 comments on commit 2c603ad

Please sign in to comment.