File tree Expand file tree Collapse file tree 5 files changed +297
-294
lines changed Expand file tree Collapse file tree 5 files changed +297
-294
lines changed Original file line number Diff line number Diff line change 7474 "@types/resolve" : " ^1.20.1" ,
7575 "@types/sass" : " ~1.43.0" ,
7676 "@types/stylus" : " ^0.48.36" ,
77- "@types/ws" : " ^8.2.0 " ,
77+ "@types/ws" : " ^8.2.2 " ,
7878 "@vue/compiler-dom" : " ^3.2.22" ,
7979 "acorn" : " ^8.6.0" ,
8080 "acorn-class-fields" : " ^1.0.0" ,
117117 "tsconfck" : " 1.1.1" ,
118118 "tslib" : " ^2.3.1" ,
119119 "types" : " link:./types" ,
120- "ws" : " ^8.2.3 "
120+ "ws" : " ^8.3.0 "
121121 },
122122 "peerDependencies" : {
123123 "less" : " *" ,
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export type {
8383 ErrorPayload
8484} from 'types/hmrPayload'
8585export type { Connect } from 'types/connect'
86- export type { WebSocket } from 'types/ws'
86+ export type { WebSocket , WebSocketAlias } from 'types/ws'
8787export type { HttpProxy } from 'types/http-proxy'
8888export type { FSWatcher , WatchOptions } from 'types/chokidar'
8989export type { Terser } from 'types/terser'
Original file line number Diff line number Diff line change @@ -5,15 +5,16 @@ import {
55 ServerOptions as HttpsServerOptions
66} from 'https'
77import { WebSocketServer as WebSocket , ServerOptions } from 'ws'
8+ import { WebSocket as WebSocketTypes } from 'types/ws'
89import { ErrorPayload , HMRPayload } from 'types/hmrPayload'
910import { ResolvedConfig } from '..'
1011import { isObject } from '../utils'
1112import { Socket } from 'net'
1213export const HMR_HEADER = 'vite-hmr'
1314
1415export interface WebSocketServer {
15- on : WebSocket [ 'on' ]
16- off : WebSocket [ 'off' ]
16+ on : WebSocketTypes . Server [ 'on' ]
17+ off : WebSocketTypes . Server [ 'off' ]
1718 send ( payload : HMRPayload ) : void
1819 close ( ) : Promise < void >
1920}
You can’t perform that action at this time.
0 commit comments