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

Installation

npm install --save @types/sockjs

Summary

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

Details

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

index.d.ts

// Type definitions for sockjs 0.3
// Project: https://github.com/sockjs/sockjs-node
// Definitions by: Phil McCloghry-Laing <https://github.com/pmccloghrylaing>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

import http = require('http');

export interface ServerOptions {
    sockjs_url?: string | undefined;
    prefix?: string | undefined;
    response_limit?: number | undefined;
    websocket?: boolean | undefined;
    jsessionid?: any;
    log?(severity: string, message: string): void;
    heartbeat_delay?: number | undefined;
    disconnect_delay?: number | undefined;
}

export function createServer(options?: ServerOptions): Server;

export interface Server extends NodeJS.EventEmitter {
    installHandlers(server: http.Server, options?: ServerOptions): any;

    on(event: 'connection', listener: (conn: Connection) => any): this;
    on(event: string, listener: Function): this;
}

export interface Connection extends NodeJS.ReadWriteStream {
    remoteAddress: string;
    remotePort: number;
    address: {
        [key: string]: {
            address: string;
            port: number;
        };
    };
    headers: {
        [key: string]: string;
    };
    url: string;
    pathname: string;
    prefix: string;
    protocol: string;
    readyState: number;
    id: string;

    close(code?: string, reason?: string): boolean;
    destroy(): void;

    on(event: 'data', listener: (message: string) => any): this;
    on(event: 'close', listener: () => void): this;
    on(event: string, listener: Function): this;
}

Additional Details

  • Last updated: Tue, 06 Jul 2021 16:35:05 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Phil McCloghry-Laing.

Current Tags

  • 0.3.33                                ...           latest (3 years ago)
  • 0.3.31                                ...           ts2.0 (7 years ago)
  • 0.3.31                                ...           ts2.1 (7 years ago)
  • 0.3.31                                ...           ts2.2 (7 years ago)
  • 0.3.31                                ...           ts2.3 (7 years ago)
  • 0.3.31                                ...           ts2.4 (7 years ago)
  • 0.3.31                                ...           ts2.5 (7 years ago)
  • 0.3.31                                ...           ts2.6 (7 years ago)
  • 0.3.31                                ...           ts2.7 (7 years ago)
  • 0.3.31                                ...           ts2.8 (7 years ago)
  • 0.3.31                                ...           ts2.9 (7 years ago)
  • 0.3.32                                ...           ts3.0 (5 years ago)
  • 0.3.32                                ...           ts3.1 (5 years ago)
  • 0.3.32                                ...           ts3.2 (5 years ago)
  • 0.3.32                                ...           ts3.3 (5 years ago)
  • 0.3.32                                ...           ts3.4 (5 years ago)
  • 0.3.32                                ...           ts3.5 (5 years ago)
  • 0.3.33                                ...           ts3.6 (3 years ago)
  • 0.3.33                                ...           ts3.7 (3 years ago)
  • 0.3.33                                ...           ts3.8 (3 years ago)
  • 0.3.33                                ...           ts3.9 (3 years ago)
  • 0.3.33                                ...           ts4.0 (3 years ago)
  • 0.3.33                                ...           ts4.1 (3 years ago)
  • 0.3.33                                ...           ts4.2 (3 years ago)
  • 0.3.33                                ...           ts4.3 (3 years ago)
  • 0.3.33                                ...           ts4.4 (3 years ago)
  • 0.3.33                                ...           ts4.5 (3 years ago)
  • 0.3.33                                ...           ts4.6 (3 years ago)
  • 0.3.33                                ...           ts4.7 (3 years ago)
  • 0.3.33                                ...           ts4.8 (3 years ago)
  • 0.3.33                                ...           ts4.9 (3 years ago)
  • 0.3.33                                ...           ts5.0 (3 years ago)
  • 0.3.33                                ...           ts5.1 (3 years ago)

17 Versions

  • 0.3.33                                ...           3 years ago
  • 0.3.32                                ...           5 years ago
  • 0.3.31                                ...           7 years ago
  • 0.3.30                                ...           8 years ago
  • 0.3.29                                ...           8 years ago
  • 0.3.28                                ...           8 years ago
  • 0.3.27                                ...           8 years ago
  • 0.3.26                                ...           8 years ago
  • 0.3.25-alpha                                ...           8 years ago
  • 0.3.24-alpha                                ...           8 years ago
  • 0.3.23-alpha                                ...           8 years ago
  • 0.3.22-alpha                                ...           8 years ago
  • 0.3.21-alpha                                ...           8 years ago
  • 0.3.20-alpha                                ...           9 years ago
  • 0.3.19-alpha                                ...           9 years ago
  • 0.3.14-alpha                                ...           9 years ago
  • 0.3.13-alpha                                ...           9 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |