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

@types/ws

Package Overview
Dependencies
Maintainers
1
Versions
77
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 8.5.10 to 8.5.11

35

ws/index.d.ts

@@ -115,28 +115,12 @@ /// <reference types="node" />

// HTML5 WebSocket events
addEventListener(
method: "message",
cb: (event: WebSocket.MessageEvent) => void,
addEventListener<K extends keyof WebSocket.WebSocketEventMap>(
type: K,
listener: (event: WebSocket.WebSocketEventMap[K]) => void,
options?: WebSocket.EventListenerOptions,
): void;
addEventListener(
method: "close",
cb: (event: WebSocket.CloseEvent) => void,
options?: WebSocket.EventListenerOptions,
removeEventListener<K extends keyof WebSocket.WebSocketEventMap>(
type: K,
listener: (event: WebSocket.WebSocketEventMap[K]) => void,
): void;
addEventListener(
method: "error",
cb: (event: WebSocket.ErrorEvent) => void,
options?: WebSocket.EventListenerOptions,
): void;
addEventListener(
method: "open",
cb: (event: WebSocket.Event) => void,
options?: WebSocket.EventListenerOptions,
): void;
removeEventListener(method: "message", cb: (event: WebSocket.MessageEvent) => void): void;
removeEventListener(method: "close", cb: (event: WebSocket.CloseEvent) => void): void;
removeEventListener(method: "error", cb: (event: WebSocket.ErrorEvent) => void): void;
removeEventListener(method: "open", cb: (event: WebSocket.Event) => void): void;
// Events

@@ -311,2 +295,9 @@ on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;

interface WebSocketEventMap {
open: Event;
error: ErrorEvent;
close: CloseEvent;
message: MessageEvent;
}
interface EventListenerOptions {

@@ -313,0 +304,0 @@ once?: boolean | undefined;

{
"name": "@types/ws",
"version": "8.5.10",
"version": "8.5.11",
"description": "TypeScript definitions for ws",

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

},
"typesPublisherContentHash": "eccd9f863e6a5af0b53c429a6feeed5375c23d20c06a73d226f4b59f34407820",
"typeScriptVersion": "4.5"
"typesPublisherContentHash": "f8abfbf3acbcdca0f5c6b03740fc61b384c4507cc71eb700893ed0bb4f7ae35b",
"typeScriptVersion": "4.8"
}

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

### Additional Details
* Last updated: Mon, 20 Nov 2023 23:36:24 GMT
* Last updated: Sat, 13 Jul 2024 02:42:04 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@

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