From 55c92d056f02a76c437ae20e7ff6700c45cfb983 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 17 Nov 2021 13:33:39 +0300 Subject: [PATCH] Fixed #1701 - TS Typings for TerminalService are incorrect --- .../terminalservice/TerminalService.d.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/terminalservice/TerminalService.d.ts b/src/components/terminalservice/TerminalService.d.ts index dbe9defa4..b01eb9d5d 100755 --- a/src/components/terminalservice/TerminalService.d.ts +++ b/src/components/terminalservice/TerminalService.d.ts @@ -1,8 +1,11 @@ -declare class TerminalService { - $on(action: string, fn: any): any; - $emit(action: string, params?: any): any; - $off(action: string, id: number): void; - $subscribed(action: string): boolean; +type TerminalServiceActionType = 'command' | 'response'; + +export interface TerminalServiceOptions { + on(action: TerminalServiceActionType, fn: any): void; + emit(action: TerminalServiceActionType, params?: any): void; + off(action: TerminalServiceActionType, fn: any): void; } -export default TerminalService; \ No newline at end of file +declare const TerminalService: TerminalServiceOptions; + +export default TerminalService;