Socket
Socket
Sign inDemoInstall

@types/ws

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ws - npm Package Compare versions

Comparing version 6.0.4 to 7.2.0

17

ws/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for ws 6.0
// Type definitions for ws 7.2
// Project: https://github.com/websockets/ws

@@ -9,2 +9,3 @@ // Definitions by: Paul Loyd <https://github.com/loyd>

// reduckted <https://github.com/reduckted>
// teidesu <https://github.com/teidesu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -20,2 +21,3 @@

import * as zlib from 'zlib';
import * as stream from 'stream';

@@ -46,4 +48,4 @@ // WebSocket socket.

constructor(address: string | url.URL, options?: WebSocket.ClientOptions);
constructor(address: string | url.URL, protocols?: string | string[], options?: WebSocket.ClientOptions);
constructor(address: string, options?: WebSocket.ClientOptions);
constructor(address: string, protocols?: string | string[], options?: WebSocket.ClientOptions);

@@ -133,3 +135,5 @@ close(code?: number, data?: string): void;

protocol?: string;
followRedirects?: boolean;
handshakeTimeout?: number;
maxRedirects?: number;
perMessageDeflate?: boolean | PerMessageDeflateOptions;

@@ -237,3 +241,3 @@ localAddress?: string;

on(event: 'headers', cb: (this: WebSocket, headers: string[], request: http.IncomingMessage) => void): this;
on(event: 'listening', cb: (this: WebSocket) => void): this;
on(event: 'close' | 'listening', cb: (this: WebSocket) => void): this;
on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;

@@ -244,7 +248,10 @@

addListener(event: 'headers', cb: (headers: string[], request: http.IncomingMessage) => void): this;
addListener(event: 'listening', cb: () => void): this;
addListener(event: 'close' | 'listening', cb: () => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
}
// WebSocket stream
function createWebSocketStream(websocket: WebSocket, options: stream.DuplexOptions): stream.Duplex;
}
export = WebSocket;
{
"name": "@types/ws",
"version": "6.0.4",
"version": "7.2.0",
"description": "TypeScript definitions for ws",

@@ -36,2 +36,7 @@ "license": "MIT",

"githubUsername": "reduckted"
},
{
"name": "teidesu",
"url": "https://github.com/teidesu",
"githubUsername": "teidesu"
}

@@ -50,4 +55,4 @@ ],

},
"typesPublisherContentHash": "fe96747b9bb4f09959c055797757b71397d998345c0c940d8e5e67a5b1d23c68",
"typesPublisherContentHash": "8d3a85349cc6b626d4b6c2133ccebdd76a7ee17112f2b6c115190dbfd00bfc7a",
"typeScriptVersion": "2.8"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 25 Nov 2019 22:27:05 GMT
* Last updated: Wed, 15 Jan 2020 09:05:06 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Paul Loyd (https://github.com/loyd), Matt Silverlock (https://github.com/elithrar), Margus Lamp (https://github.com/mlamp), Philippe D'Alva (https://github.com/TitaneBoy), Orblazer (https://github.com/orblazer), and reduckted (https://github.com/reduckted).
These definitions were written by Paul Loyd (https://github.com/loyd), Matt Silverlock (https://github.com/elithrar), Margus Lamp (https://github.com/mlamp), Philippe D'Alva (https://github.com/TitaneBoy), Orblazer (https://github.com/orblazer), reduckted (https://github.com/reduckted), and teidesu (https://github.com/teidesu).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc