Socket
Socket
Sign inDemoInstall

@types/websocket

Package Overview
Dependencies
2
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.0.7

115

websocket/index.d.ts

@@ -13,7 +13,7 @@ // Type definitions for websocket 1.0

import events = require('events');
import http = require('http');
import https = require('https');
import net = require('net');
import url = require('url');
import events = require("events");
import http = require("http");
import https = require("https");
import net = require("net");
import url = require("url");

@@ -192,8 +192,8 @@ export interface IStringified {

// Events
on(event: 'request', cb: (request: request) => void): this;
on(event: 'connect', cb: (connection: connection) => void): this;
on(event: 'close', cb: (connection: connection, reason: number, desc: string) => void): this;
addListener(event: 'request', cb: (request: request) => void): this;
addListener(event: 'connect', cb: (connection: connection) => void): this;
addListener(event: 'close', cb: (connection: connection, reason: number, desc: string) => void): this;
on(event: "request", cb: (request: request) => void): this;
on(event: "connect", cb: (connection: connection) => void): this;
on(event: "close", cb: (connection: connection, reason: number, desc: string) => void): this;
addListener(event: "request", cb: (request: request) => void): this;
addListener(event: "connect", cb: (connection: connection) => void): this;
addListener(event: "close", cb: (connection: connection, reason: number, desc: string) => void): this;
}

@@ -287,6 +287,6 @@

// Events
on(event: 'requestResolved' | 'requestRejected', cb: (request: this) => void): this;
on(event: 'requestAccepted', cb: (connection: connection) => void): this;
addListener(event: 'requestResolved' | 'requestRejected', cb: (request: this) => void): this;
addListener(event: 'requestAccepted', cb: (connection: connection) => void): this;
on(event: "requestResolved" | "requestRejected", cb: (request: this) => void): this;
on(event: "requestAccepted", cb: (connection: connection) => void): this;
addListener(event: "requestResolved" | "requestRejected", cb: (request: this) => void): this;
addListener(event: "requestAccepted", cb: (connection: connection) => void): this;

@@ -305,3 +305,3 @@ readHandshake(): void;

export interface IUtf8Message {
type: 'utf8';
type: "utf8";
utf8Data: string;

@@ -311,3 +311,3 @@ }

export interface IBinaryMessage {
type: 'binary';
type: "binary";
binaryData: Buffer;

@@ -355,6 +355,6 @@ }

// Events
on(event: 'advance', cb: (n: number) => void): this;
on(event: 'write', cb: (buf: Buffer) => void): this;
addListener(event: 'advance', cb: (n: number) => void): this;
addListener(event: 'write', cb: (buf: Buffer) => void): this;
on(event: "advance", cb: (n: number) => void): this;
on(event: "write", cb: (buf: Buffer) => void): this;
addListener(event: "advance", cb: (n: number) => void): this;
addListener(event: "write", cb: (buf: Buffer) => void): this;
}

@@ -375,3 +375,3 @@

static CLOSE_DESCRIPTIONS: {[code: number]: string};
static CLOSE_DESCRIPTIONS: { [code: number]: string };

@@ -434,4 +434,9 @@ /**

constructor(socket: net.Socket, extensions: IExtension[], protocol: string,
maskOutgoingPackets: boolean, config: IConfig);
constructor(
socket: net.Socket,
extensions: IExtension[],
protocol: string,
maskOutgoingPackets: boolean,
config: IConfig,
);

@@ -517,16 +522,16 @@ /**

// Events
on(event: 'message', cb: (data: Message) => void): this;
on(event: 'frame', cb: (frame: frame) => void): this;
on(event: 'close', cb: (code: number, desc: string) => void): this;
on(event: 'error', cb: (err: Error) => void): this;
on(event: 'drain' | 'pause' | 'resume', cb: () => void): this;
on(event: 'ping', cb: (cancel: () => void, binaryPayload: Buffer) => void): this;
on(event: 'pong', cb: (binaryPayload: Buffer) => void): this;
addListener(event: 'message', cb: (data: Message) => void): this;
addListener(event: 'frame', cb: (frame: frame) => void): this;
addListener(event: 'close', cb: (code: number, desc: string) => void): this;
addListener(event: 'error', cb: (err: Error) => void): this;
addListener(event: 'drain' | 'pause' | 'resume', cb: () => void): this;
addListener(event: 'ping', cb: (cancel: () => void, binaryPayload: Buffer) => void): this;
addListener(event: 'pong', cb: (binaryPayload: Buffer) => void): this;
on(event: "message", cb: (data: Message) => void): this;
on(event: "frame", cb: (frame: frame) => void): this;
on(event: "close", cb: (code: number, desc: string) => void): this;
on(event: "error", cb: (err: Error) => void): this;
on(event: "drain" | "pause" | "resume", cb: () => void): this;
on(event: "ping", cb: (cancel: () => void, binaryPayload: Buffer) => void): this;
on(event: "pong", cb: (binaryPayload: Buffer) => void): this;
addListener(event: "message", cb: (data: Message) => void): this;
addListener(event: "frame", cb: (frame: frame) => void): this;
addListener(event: "close", cb: (code: number, desc: string) => void): this;
addListener(event: "error", cb: (err: Error) => void): this;
addListener(event: "drain" | "pause" | "resume", cb: () => void): this;
addListener(event: "ping", cb: (cancel: () => void, binaryPayload: Buffer) => void): this;
addListener(event: "pong", cb: (binaryPayload: Buffer) => void): this;
}

@@ -643,3 +648,9 @@

*/
connect(requestUrl: url.Url | string, requestedProtocols?: string | string[], origin?: string, headers?: http.OutgoingHttpHeaders, extraRequestOptions?: http.RequestOptions): void;
connect(
requestUrl: url.Url | string,
requestedProtocols?: string | string[],
origin?: string,
headers?: http.OutgoingHttpHeaders,
extraRequestOptions?: http.RequestOptions,
): void;

@@ -653,8 +664,8 @@ /**

// Events
on(event: 'connect', cb: (connection: connection) => void): this;
on(event: 'connectFailed', cb: (err: Error) => void): this;
on(event: 'httpResponse', cb: (response: http.IncomingMessage, client: client) => void): this;
addListener(event: 'connect', cb: (connection: connection) => void): this;
addListener(event: 'connectFailed', cb: (err: Error) => void): this;
addListener(event: 'httpResponse', cb: (response: http.IncomingMessage, client: client) => void): this;
on(event: "connect", cb: (connection: connection) => void): this;
on(event: "connectFailed", cb: (err: Error) => void): this;
on(event: "httpResponse", cb: (response: http.IncomingMessage, client: client) => void): this;
addListener(event: "connect", cb: (connection: connection) => void): this;
addListener(event: "connectFailed", cb: (err: Error) => void): this;
addListener(event: "httpResponse", cb: (response: http.IncomingMessage, client: client) => void): this;
}

@@ -712,6 +723,6 @@

// Events
on(event: 'requestAccepted', cb: (connection: connection) => void): this;
on(event: 'requestRejected', cb: (request: this) => void): this;
addListener(event: 'requestAccepted', cb: (connection: connection) => void): this;
addListener(event: 'requestRejected', cb: (request: this) => void): this;
on(event: "requestAccepted", cb: (connection: connection) => void): this;
on(event: "requestRejected", cb: (request: this) => void): this;
addListener(event: "requestAccepted", cb: (connection: connection) => void): this;
addListener(event: "requestRejected", cb: (request: this) => void): this;
}

@@ -777,3 +788,3 @@

_bufferedAmount: number;
_binaryType: 'arraybuffer';
_binaryType: "arraybuffer";
_connection?: connection | undefined;

@@ -788,3 +799,3 @@ _client: client;

binaryType: 'arraybuffer';
binaryType: "arraybuffer";

@@ -816,3 +827,3 @@ CONNECTING: number;

disableWarnings: boolean;
deprecationWarningMap: {[name: string]: string};
deprecationWarningMap: { [name: string]: string };
warn(deprecationName: string): void;

@@ -819,0 +830,0 @@ };

{
"name": "@types/websocket",
"version": "1.0.6",
"version": "1.0.7",
"description": "TypeScript definitions for websocket",

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

},
"typesPublisherContentHash": "62b61b8d6826eb86df28ab7f0115df8a86b0d2641c696bfb3cfcab37db4e57ca",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "e8afe6093b842c738d79417644519ab2c17cadee84685ca72de133e70536eafd",
"typeScriptVersion": "4.5"
}

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

### Additional Details
* Last updated: Thu, 24 Aug 2023 22:03:20 GMT
* Last updated: Mon, 25 Sep 2023 13:39:07 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc