mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Updated ws types to be compatible with updated types in node (#45131)
The `types/ws` package is incompatible with the recent updates in `types/node`. You can see the issue described at https://github.com/slackapi/node-slack-sdk/issues/1024. This change just references the `SecureContextOptions` from the built in `tls` module in node and properly adds the updated properties.
This commit is contained in:
parent
6800e59a61
commit
abbd83bc6f
9
types/ws/index.d.ts
vendored
9
types/ws/index.d.ts
vendored
@ -19,6 +19,7 @@ import * as net from 'net';
|
||||
import * as url from 'url';
|
||||
import * as zlib from 'zlib';
|
||||
import * as stream from 'stream';
|
||||
import { SecureContextOptions } from 'tls';
|
||||
|
||||
// WebSocket socket.
|
||||
declare class WebSocket extends events.EventEmitter {
|
||||
@ -128,7 +129,7 @@ declare namespace WebSocket {
|
||||
type VerifyClientCallbackAsync = (info: { origin: string; secure: boolean; req: http.IncomingMessage }
|
||||
, callback: (res: boolean, code?: number, message?: string, headers?: http.OutgoingHttpHeaders) => void) => void;
|
||||
|
||||
interface ClientOptions {
|
||||
interface ClientOptions extends SecureContextOptions {
|
||||
protocol?: string;
|
||||
followRedirects?: boolean;
|
||||
handshakeTimeout?: number;
|
||||
@ -143,12 +144,6 @@ declare namespace WebSocket {
|
||||
family?: number;
|
||||
checkServerIdentity?(servername: string, cert: CertMeta): boolean;
|
||||
rejectUnauthorized?: boolean;
|
||||
passphrase?: string;
|
||||
ciphers?: string;
|
||||
cert?: CertMeta;
|
||||
key?: CertMeta;
|
||||
pfx?: string | Buffer;
|
||||
ca?: CertMeta;
|
||||
maxPayload?: number;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user