8889841cREADME.md000066600000004332150451744540006042 0ustar00# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs/index.d.ts) ````ts // Type definitions for sockjs 0.3 // Project: https://github.com/sockjs/sockjs-node // Definitions by: Phil McCloghry-Laing // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// 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](https://npmjs.com/package/@types/node) * Global values: none # Credits These definitions were written by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing). index.d.ts000066600000003071150451744540006463 0ustar00// Type definitions for sockjs 0.3 // Project: https://github.com/sockjs/sockjs-node // Definitions by: Phil McCloghry-Laing // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// 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; } LICENSE000066600000002165150451744540005572 0ustar00 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE package.json000066600000001505150451744540007050 0ustar00{ "name": "@types/sockjs", "version": "0.3.33", "description": "TypeScript definitions for sockjs", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs", "license": "MIT", "contributors": [ { "name": "Phil McCloghry-Laing", "url": "https://github.com/pmccloghrylaing", "githubUsername": "pmccloghrylaing" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/sockjs" }, "scripts": {}, "dependencies": { "@types/node": "*" }, "typesPublisherContentHash": "60705ce98e42b180403cdab479820d2e483d02749f85cb6ef9bbd39ee05102af", "typeScriptVersion": "3.6" }