Merge pull request #10905 from hedefalk/master

Fixes #10904
This commit is contained in:
Ryan Cavanaugh
2016-08-30 18:41:59 -07:00
committed by GitHub

35
ws/ws.d.ts vendored
View File

@@ -34,21 +34,8 @@ declare module "ws" {
onclose: (event: {wasClean: boolean; code: number; reason: string; target: WebSocket}) => void;
onmessage: (event: {data: any; type: string; target: WebSocket}) => void;
constructor(address: string, options?: {
protocol?: string;
agent?: http.Agent;
headers?: {[key: string]: string};
protocolVersion?: any;
host?: string;
origin?: string;
pfx?: any;
key?: any;
passphrase?: string;
cert?: any;
ca?: any[];
ciphers?: string;
rejectUnauthorized?: boolean;
});
constructor(address: string, options?: WebSocket.IClientOptions);
constructor(address: string, protocols?: string | string[], options?: WebSocket.IClientOptions);
close(code?: number, data?: any): void;
pause(): void;
@@ -92,7 +79,23 @@ declare module "ws" {
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 IClientOptions {
protocol?: string;
agent?: http.Agent;
headers?: {[key: string]: string};
protocolVersion?: any;
host?: string;
origin?: string;
pfx?: any;
key?: any;
passphrase?: string;
cert?: any;
ca?: any[];
ciphers?: string;
rejectUnauthorized?: boolean;
}
export interface IServerOptions {
host?: string;
port?: number;