Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/websocket

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/websocket - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

18

websocket/index.d.ts

@@ -301,8 +301,14 @@ // Type definitions for websocket 1.0

export interface IMessage {
type: string;
utf8Data?: string | undefined;
binaryData?: Buffer | undefined;
export interface IUtf8Message {
type: 'utf8';
utf8Data: string;
}
export interface IBinaryMessage {
type: 'binary';
binaryData: Buffer;
}
export type Message = IUtf8Message | IBinaryMessage;
export interface IBufferList extends events.EventEmitter {

@@ -504,3 +510,3 @@ encoding: string;

// Events
on(event: 'message', cb: (data: IMessage) => void): this;
on(event: 'message', cb: (data: Message) => void): this;
on(event: 'frame', cb: (frame: frame) => void): this;

@@ -512,3 +518,3 @@ on(event: 'close', cb: (code: number, desc: string) => void): this;

on(event: 'pong', cb: (binaryPayload: Buffer) => void): this;
addListener(event: 'message', cb: (data: IMessage) => void): this;
addListener(event: 'message', cb: (data: Message) => void): this;
addListener(event: 'frame', cb: (frame: frame) => void): this;

@@ -515,0 +521,0 @@ addListener(event: 'close', cb: (code: number, desc: string) => void): this;

{
"name": "@types/websocket",
"version": "1.0.3",
"version": "1.0.4",
"description": "TypeScript definitions for websocket",

@@ -45,4 +45,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/websocket",

},
"typesPublisherContentHash": "3dc14ce50d8295e8c501297f08102e2cc0fcfca201e11a8344f8b2dd2b04a796",
"typesPublisherContentHash": "379b1bf138da081eca343964253ac97e0b7afbfe9c38d1d2351d9400885c95a3",
"typeScriptVersion": "3.6"
}

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

### Additional Details
* Last updated: Fri, 02 Jul 2021 18:05:34 GMT
* Last updated: Wed, 28 Jul 2021 00:31:32 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@ * Global values: none

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