From 81e9cfe692d45166f7349fcc0d550c0eea3e0441 Mon Sep 17 00:00:00 2001 From: Stefan Erichsen Date: Thu, 8 Feb 2018 16:00:55 +0100 Subject: [PATCH] added test and my name --- types/stompjs/index.d.ts | 3 +-- types/stompjs/stompjs-tests.ts | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/types/stompjs/index.d.ts b/types/stompjs/index.d.ts index 5cefa092a0..7d819f4352 100644 --- a/types/stompjs/index.d.ts +++ b/types/stompjs/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for stompjs 2.3 // Project: https://github.com/jmesnil/stomp-websocket -// Definitions by: Jimi Charalampidis +// Definitions by: Jimi Charalampidis , Stefan Erichsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -13,7 +13,6 @@ export const VERSIONS: { }; export class Client { - connected: boolean; counter: number; heartbeat: { diff --git a/types/stompjs/stompjs-tests.ts b/types/stompjs/stompjs-tests.ts index 15331fc81f..5d6eb1d0a5 100644 --- a/types/stompjs/stompjs-tests.ts +++ b/types/stompjs/stompjs-tests.ts @@ -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(() => { }, {});