mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
Fix type error
This commit is contained in:
parent
165bc24178
commit
adaec7db4c
@ -1,3 +1,4 @@
|
||||
import { Socket } from 'net';
|
||||
import WebSocket, { WebSocketServer } from 'ws';
|
||||
import { stringify } from 'telejson';
|
||||
|
||||
@ -11,7 +12,8 @@ export class ServerChannel {
|
||||
|
||||
server.on('upgrade', (request, socket, head) => {
|
||||
if (request.url === '/storybook-server-channel') {
|
||||
this.webSocketServer.handleUpgrade(request, socket, head, (ws) => {
|
||||
// Cast can be removed once https://github.com/DefinitelyTyped/DefinitelyTyped/pull/57590 is released.
|
||||
this.webSocketServer.handleUpgrade(request, socket as Socket, head, (ws) => {
|
||||
this.webSocketServer.emit('connection', ws, request);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user