Fixed #1701 - TS Typings for TerminalService are incorrect

pull/1280/head^2
mertsincan 2021-11-17 13:33:39 +03:00
parent ad8e2796f7
commit 55c92d056f
1 changed files with 9 additions and 6 deletions

View File

@ -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;
declare const TerminalService: TerminalServiceOptions;
export default TerminalService;