@types/engine.io
Advanced tools
Comparing version 3.1.7 to 3.1.8
@@ -9,4 +9,4 @@ // Type definitions for engine.io 3.1 | ||
import http = require('http'); | ||
import net = require('net'); | ||
import http = require("http"); | ||
import net = require("net"); | ||
import { EventEmitter } from "events"; | ||
@@ -16,4 +16,4 @@ import { Duplex } from "stream"; | ||
declare namespace engine { | ||
type Message = string|Buffer|ArrayBuffer|ArrayBufferView; | ||
type Transport = "polling"|"websocket"; | ||
type Message = string | Buffer | ArrayBuffer | ArrayBufferView; | ||
type Transport = "polling" | "websocket"; | ||
interface Packet { | ||
@@ -24,3 +24,6 @@ type: string; | ||
} | ||
type AllowRequestFunction = (req: http.IncomingMessage, fn: (err: string|null|undefined, success: boolean) => void) => void; | ||
type AllowRequestFunction = ( | ||
req: http.IncomingMessage, | ||
fn: (err: string | null | undefined, success: boolean) => void, | ||
) => void; | ||
@@ -70,3 +73,3 @@ interface ServerOptions { | ||
*/ | ||
cookie?: string|boolean | undefined; | ||
cookie?: string | boolean | undefined; | ||
/** | ||
@@ -78,3 +81,3 @@ * path of the above cookie option. If false, no path will be sent, | ||
*/ | ||
cookiePath?: string|boolean | undefined; | ||
cookiePath?: string | boolean | undefined; | ||
/** | ||
@@ -91,3 +94,3 @@ * If true HttpOnly io cookie cannot be accessed by client-side APIs, | ||
*/ | ||
wsEngine?: "ws"|"uws" | undefined; | ||
wsEngine?: "ws" | "uws" | undefined; | ||
/** | ||
@@ -114,3 +117,3 @@ * an optional packet which will be concatenated to the handshake packet emitted by Engine.IO. | ||
*/ | ||
handlePreflightRequest?: boolean|((req: http.IncomingMessage, res: http.ServerResponse) => void) | undefined; | ||
handlePreflightRequest?: boolean | ((req: http.IncomingMessage, res: http.ServerResponse) => void) | undefined; | ||
} | ||
@@ -130,3 +133,3 @@ interface ServerAttachOptions extends ServerOptions, AttachOptions {} | ||
*/ | ||
clients: {[sid: string]: Socket}; | ||
clients: { [sid: string]: Socket }; | ||
/** | ||
@@ -144,4 +147,4 @@ * number of connected clients. | ||
*/ | ||
on(ev: 'connection'|'drain', fn: (socket: Socket) => void): this; | ||
on(ev: 'flush', fn: (socket: Socket, buffer: Packet[]) => void): this; | ||
on(ev: "connection" | "drain", fn: (socket: Socket) => void): this; | ||
on(ev: "flush", fn: (socket: Socket, buffer: Packet[]) => void): this; | ||
/** | ||
@@ -195,3 +198,3 @@ * Closes all clients | ||
*/ | ||
readyState: 'opening'|'open'|'closing'|'closed'; | ||
readyState: "opening" | "open" | "closing" | "closed"; | ||
@@ -201,3 +204,3 @@ /** | ||
*/ | ||
send(message: Message, opts?: MessageOptions, fn?: ((transport: any) => void)): void; | ||
send(message: Message, opts?: MessageOptions, fn?: (transport: any) => void): void; | ||
@@ -216,3 +219,3 @@ /** | ||
*/ | ||
on(ev: "message", fn: (data: string|Buffer) => void): this; | ||
on(ev: "message", fn: (data: string | Buffer) => void): this; | ||
/** | ||
@@ -219,0 +222,0 @@ * Fired when an error occurs. |
{ | ||
"name": "@types/engine.io", | ||
"version": "3.1.7", | ||
"version": "3.1.8", | ||
"description": "TypeScript definitions for engine.io", | ||
@@ -25,4 +25,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/engine.io", | ||
}, | ||
"typesPublisherContentHash": "6c0bc6588bef97d6a76d4da55f838387c023f0ca1ec25c5ab808721f5f1901fc", | ||
"typeScriptVersion": "3.6" | ||
"typesPublisherContentHash": "c83c41041f6f2903c04e8874c327c976eedd415b51815d494be34fcfc6d9e2af", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 03 Aug 2021 08:31:20 GMT | ||
* Last updated: Sat, 23 Sep 2023 17:07:22 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11043
221