@types/sockjs-client
TypeScript definitions for sockjs-client
Last updated 3 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/sockjs-client 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/sockjs-client

Summary

This package contains type definitions for sockjs-client (https://github.com/sockjs/sockjs-client).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs-client.

index.d.ts

export = SockJS;
export as namespace SockJS;

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

declare namespace SockJS {
    type CONNECTING = 0;
    type OPEN = 1;
    type CLOSING = 2;
    type CLOSED = 3;

    type State = CONNECTING | OPEN | CLOSING | CLOSED;

    interface BaseEvent extends Event {
        type: string;
    }

    type OpenEvent = BaseEvent;

    interface CloseEvent extends BaseEvent {
        code: number;
        reason: string;
        wasClean: boolean;
    }

    interface MessageEvent extends BaseEvent {
        data: string;
    }

    type SessionGenerator = () => string;

    interface Options {
        server?: string | undefined;
        sessionId?: number | SessionGenerator | undefined;
        transports?: string | string[] | undefined;
        timeout?: number | undefined;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Emil Ivanov, Alexander Rusakov, BendingBender, Soner Köksal, and Alexander Putilov.

Current Tags

  • 1.5.4                                ...           latest (2 years ago)
  • 1.1.1                                ...           ts2.0 (7 years ago)
  • 1.1.1                                ...           ts2.1 (7 years ago)
  • 1.1.1                                ...           ts2.2 (7 years ago)
  • 1.1.1                                ...           ts2.3 (7 years ago)
  • 1.1.1                                ...           ts2.4 (7 years ago)
  • 1.1.1                                ...           ts2.5 (7 years ago)
  • 1.1.1                                ...           ts2.6 (7 years ago)
  • 1.1.1                                ...           ts2.7 (7 years ago)
  • 1.1.1                                ...           ts2.8 (7 years ago)
  • 1.1.1                                ...           ts2.9 (7 years ago)
  • 1.1.1                                ...           ts3.0 (7 years ago)
  • 1.1.1                                ...           ts3.1 (7 years ago)
  • 1.1.1                                ...           ts3.2 (7 years ago)
  • 1.5.0                                ...           ts3.3 (5 years ago)
  • 1.5.0                                ...           ts3.4 (5 years ago)
  • 1.5.0                                ...           ts3.5 (5 years ago)
  • 1.5.1                                ...           ts3.6 (5 years ago)
  • 1.5.1                                ...           ts3.7 (5 years ago)
  • 1.5.1                                ...           ts3.8 (5 years ago)
  • 1.5.1                                ...           ts3.9 (5 years ago)
  • 1.5.1                                ...           ts4.0 (5 years ago)
  • 1.5.1                                ...           ts4.1 (5 years ago)
  • 1.5.1                                ...           ts4.2 (5 years ago)
  • 1.5.1                                ...           ts4.3 (5 years ago)
  • 1.5.1                                ...           ts4.4 (5 years ago)
  • 1.5.4                                ...           ts4.5 (2 years ago)
  • 1.5.4                                ...           ts4.6 (2 years ago)
  • 1.5.4                                ...           ts4.7 (2 years ago)
  • 1.5.4                                ...           ts4.8 (2 years ago)
  • 1.5.4                                ...           ts4.9 (2 years ago)
  • 1.5.4                                ...           ts5.0 (2 years ago)
  • 1.5.4                                ...           ts5.1 (2 years ago)
  • 1.5.4                                ...           ts5.2 (2 years ago)
  • 1.5.4                                ...           ts5.3 (2 years ago)
  • 1.5.4                                ...           ts5.4 (2 years ago)
  • 1.5.4                                ...           ts5.5 (2 years ago)
  • 1.5.4                                ...           ts5.6 (2 years ago)
  • 1.5.4                                ...           ts5.7 (2 years ago)

23 Versions

  • 1.5.4                                ...           2 years ago
  • 1.5.3                                ...           2 years ago
  • 1.5.2                                ...           3 years ago
  • 1.5.1                                ...           5 years ago
  • 1.5.0                                ...           5 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.32                                ...           9 years ago
  • 1.0.31                                ...           9 years ago
  • 1.0.30                                ...           10 years ago
  • 1.0.29                                ...           10 years ago
  • 1.0.28                                ...           10 years ago
  • 1.0.27                                ...           10 years ago
  • 1.0.26                                ...           10 years ago
  • 1.0.25-alpha                                ...           10 years ago
  • 1.0.24-alpha                                ...           10 years ago
  • 1.0.23-alpha                                ...           10 years ago
  • 1.0.22-alpha                                ...           10 years ago
  • 1.0.21-alpha                                ...           10 years ago
  • 1.0.20-alpha                                ...           10 years ago
  • 1.0.19-alpha                                ...           10 years ago
  • 1.0.14-alpha                                ...           10 years ago
  • 1.0.13-alpha                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |