@types/sockjs-client

  • Version 1.5.4
  • Published
  • 5.57 kB
  • No dependencies
  • MIT license

Install

npm i @types/sockjs-client
yarn add @types/sockjs-client
pnpm add @types/sockjs-client

Overview

TypeScript definitions for sockjs-client

Index

Variables

variable SockJS

const SockJS: {
(url: string, _reserved?: any, options?: SockJS.Options): WebSocket;
new (url: string, _reserved?: any, options?: SockJS.Options): WebSocket;
prototype: WebSocket;
CONNECTING: SockJS.CONNECTING;
OPEN: SockJS.OPEN;
CLOSING: SockJS.CLOSING;
CLOSED: SockJS.CLOSED;
};

    Interfaces

    interface BaseEvent

    interface BaseEvent extends Event {}

      property type

      type: string;

        interface CloseEvent

        interface CloseEvent extends BaseEvent {}

          property code

          code: number;

            property reason

            reason: string;

              property wasClean

              wasClean: boolean;

                interface MessageEvent

                interface MessageEvent extends BaseEvent {}

                  property data

                  data: string;

                    interface Options

                    interface Options {}

                      property server

                      server?: string | undefined;

                        property sessionId

                        sessionId?: number | SessionGenerator | undefined;

                          property timeout

                          timeout?: number | undefined;

                            property transports

                            transports?: string | string[] | undefined;

                              Type Aliases

                              type CLOSED

                              type CLOSED = 3;

                                type CLOSING

                                type CLOSING = 2;

                                  type CONNECTING

                                  type CONNECTING = 0;

                                    type OPEN

                                    type OPEN = 1;

                                      type OpenEvent

                                      type OpenEvent = BaseEvent;

                                        type SessionGenerator

                                        type SessionGenerator = () => string;

                                          type State

                                          type State = CONNECTING | OPEN | CLOSING | CLOSED;

                                            Package Files (1)

                                            Dependencies (0)

                                            No dependencies.

                                            Dev Dependencies (0)

                                            No dev dependencies.

                                            Peer Dependencies (0)

                                            No peer dependencies.

                                            Badge

                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/sockjs-client.

                                            • Markdown
                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/sockjs-client)
                                            • HTML
                                              <a href="https://www.jsdocs.io/package/@types/sockjs-client"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>