@types/stompjs
Advanced tools
Comparing version 2.3.6 to 2.3.7
@@ -1,7 +0,1 @@ | ||
// Type definitions for stompjs 2.3 | ||
// Project: https://github.com/jmesnil/stomp-websocket | ||
// Definitions by: Jimi Charalampidis <https://github.com/jimic> | ||
// Stefan Erichsen <https://github.com/Dr4k4n> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
/// <reference types="node" /> | ||
@@ -8,0 +2,0 @@ |
{ | ||
"name": "@types/stompjs", | ||
"version": "2.3.6", | ||
"version": "2.3.7", | ||
"description": "TypeScript definitions for stompjs", | ||
@@ -10,9 +10,9 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stompjs", | ||
"name": "Jimi Charalampidis", | ||
"url": "https://github.com/jimic", | ||
"githubUsername": "jimic" | ||
"githubUsername": "jimic", | ||
"url": "https://github.com/jimic" | ||
}, | ||
{ | ||
"name": "Stefan Erichsen", | ||
"url": "https://github.com/Dr4k4n", | ||
"githubUsername": "Dr4k4n" | ||
"githubUsername": "Dr4k4n", | ||
"url": "https://github.com/Dr4k4n" | ||
} | ||
@@ -31,4 +31,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "257c36ff9937a1592d22a04c4a587bf0edac7fb2279df2b97924faffa2206509", | ||
"typesPublisherContentHash": "690b846c61615781bcb4554aa83ef97457a0ba738f709a8c97904aa3a958b968", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,9 +9,89 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stompjs. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stompjs/index.d.ts) | ||
````ts | ||
/// <reference types="node" /> | ||
export const VERSIONS: { | ||
V1_0: string; | ||
V1_1: string; | ||
V1_2: string; | ||
supportedVersions: () => string[]; | ||
}; | ||
export class Client { | ||
connected: boolean; | ||
counter: number; | ||
heartbeat: { | ||
incoming: number; | ||
outgoing: number; | ||
}; | ||
maxWebSocketFrameSize: number; | ||
subscriptions: {}; | ||
ws: WebSocket; | ||
debug(...args: string[]): any; | ||
connect( | ||
headers: { login: string; passcode: string; host?: string | undefined }, | ||
connectCallback: (frame?: Frame) => any, | ||
errorCallback?: (error: Frame | string) => any, | ||
): any; | ||
connect(headers: {}, connectCallback: (frame?: Frame) => any, errorCallback?: (error: Frame | string) => any): any; | ||
connect( | ||
login: string, | ||
passcode: string, | ||
connectCallback: (frame?: Frame) => any, | ||
errorCallback?: (error: Frame | string) => any, | ||
host?: string, | ||
): any; | ||
disconnect(disconnectCallback: () => any, headers?: {}): any; | ||
send(destination: string, headers?: {}, body?: string): any; | ||
subscribe(destination: string, callback?: (message: Message) => any, headers?: {}): Subscription; | ||
unsubscribe(id: string): void; | ||
begin(transaction: string): any; | ||
commit(transaction: string): any; | ||
abort(transaction: string): any; | ||
ack(messageID: string, subscription: string, headers?: {}): any; | ||
nack(messageID: string, subscription: string, headers?: {}): any; | ||
} | ||
export interface Subscription { | ||
id: string; | ||
unsubscribe(): void; | ||
} | ||
export interface Message extends Frame { | ||
ack(headers?: {}): any; | ||
nack(headers?: {}): any; | ||
} | ||
export class Frame { | ||
command: string; | ||
headers: {}; | ||
body: string; | ||
constructor(command: string, headers?: {}, body?: string); | ||
toString(): string; | ||
static sizeOfUTF8(s: string): number; | ||
static unmarshall(datas: any): any; | ||
static marshall(command: string, headers?: {}, body?: string): any; | ||
} | ||
export function client(url: string, protocols?: string | Array<string>): Client; | ||
export function over(ws: WebSocket): Client; | ||
export function overTCP(host: string, port: number): Client; | ||
export function overWS(url: string): Client; | ||
export function setInterval(interval: number, f: (...args: any[]) => void): NodeJS.Timer; | ||
export function clearInterval(id: NodeJS.Timer): void; | ||
```` | ||
### Additional Details | ||
* Last updated: Mon, 25 Sep 2023 13:39:06 GMT | ||
* Last updated: Wed, 18 Oct 2023 11:45:06 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [Jimi Charalampidis](https://github.com/jimic), and [Stefan Erichsen](https://github.com/Dr4k4n). |
7492
97
65