mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-11 10:59:55 +08:00
type alias for 2 callback, fix #10250
This commit is contained in:
12
ws/ws.d.ts
vendored
12
ws/ws.d.ts
vendored
@@ -88,16 +88,16 @@ declare module "ws" {
|
||||
}
|
||||
|
||||
namespace WebSocket {
|
||||
|
||||
type VerifyClientCallbackSync = (info: {origin: string; secure: boolean; req: http.ServerRequest}) => boolean;
|
||||
type VerifyClientCallbackAsync = (info: {origin: string; secure: boolean; req: http.ServerRequest}
|
||||
, callback: (res: boolean) => void) => void;
|
||||
|
||||
export interface IServerOptions {
|
||||
host?: string;
|
||||
port?: number;
|
||||
server?: http.Server;
|
||||
verifyClient?: (
|
||||
((info: {origin: string; secure: boolean; req: http.ServerRequest}) => boolean)
|
||||
|
|
||||
((info: {origin: string; secure: boolean; req: http.ServerRequest},
|
||||
callback: (res: boolean) => void) => void)
|
||||
);
|
||||
verifyClient?: VerifyClientCallbackAsync | VerifyClientCallbackSync;
|
||||
handleProtocols?: any;
|
||||
path?: string;
|
||||
noServer?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user