mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
Merge pull request #23511 from Dr4K4n/master
stompjs - Fixed problem that Frame wasn't implementing Message
This commit is contained in:
Vendored
+7
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for stompjs 2.3
|
||||
// Project: https://github.com/jmesnil/stomp-websocket
|
||||
// Definitions by: Jimi Charalampidis <https://github.com/jimic>
|
||||
// Definitions by: Jimi Charalampidis <https://github.com/jimic>, Stefan Erichsen <https://github.com/Dr4k4n>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -13,7 +13,6 @@ export const VERSIONS: {
|
||||
};
|
||||
|
||||
export class Client {
|
||||
|
||||
connected: boolean;
|
||||
counter: number;
|
||||
heartbeat: {
|
||||
@@ -51,9 +50,14 @@ export interface Message {
|
||||
nack(headers?: {}): any;
|
||||
}
|
||||
|
||||
export class Frame {
|
||||
export class Frame implements Message {
|
||||
command: string;
|
||||
headers: {};
|
||||
body: string;
|
||||
constructor(command: string, headers?: {}, body?: string);
|
||||
|
||||
ack(headers?: {}): any;
|
||||
nack(headers?: {}): any;
|
||||
toString(): string;
|
||||
sizeOfUTF8(s: string): number;
|
||||
unmarshall(datas: any): any;
|
||||
|
||||
@@ -43,6 +43,11 @@ client.connect('user', 'pass', () => { }, (error) => { });
|
||||
client.connect('user', 'pass', () => { }, (error) => { }, 'host');
|
||||
client.connect('user', 'pass', (frame) => { }, (error) => { });
|
||||
client.connect('user', 'pass', (frame) => { }, (error) => { }, 'host');
|
||||
client.connect('user', 'pass', (frame) => {
|
||||
if (!!frame) {
|
||||
frame.command;
|
||||
}
|
||||
}, (error) => { }, 'host');
|
||||
|
||||
client.disconnect(() => { });
|
||||
client.disconnect(() => { }, {});
|
||||
|
||||
Reference in New Issue
Block a user