Skip to content

Commit

Permalink
fix(ws): use new types for ws library
Browse files Browse the repository at this point in the history
  • Loading branch information
ruizmarc committed Oct 26, 2024
1 parent c030ed1 commit d1228d9
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 d1228d9

Please sign in to comment.