Comparing version 8.5.10 to 8.5.11
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21193
359