Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/ext/websocket/lib.deno_websocket.d.ts>CloseEvent

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface CloseEvent
implements Event
import { type CloseEvent } from "https://deno.land/x/deno@v1.38.4/ext/websocket/lib.deno_websocket.d.ts";

Properties

readonly
code: number

Returns the WebSocket connection close code provided by the server.

readonly
reason: string

Returns the WebSocket connection close reason provided by the server.

readonly
wasClean: boolean

Returns true if the connection closed cleanly; false otherwise.

variable CloseEvent
import { CloseEvent } from "https://deno.land/x/deno@v1.38.4/ext/websocket/lib.deno_websocket.d.ts";

type

{ readonly prototype: CloseEvent; new (type: string, eventInitDict?: CloseEventInit): CloseEvent; }