From d1b45812d5df86ebbe7352bda63fe2a07832428a Mon Sep 17 00:00:00 2001 From: Clem Date: Tue, 11 Apr 2023 22:53:05 +0200 Subject: [PATCH] lint + refactor --- tabby-terminal/src/api/interfaces.ts | 3 ++- tabby-terminal/src/tabContextMenu.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tabby-terminal/src/api/interfaces.ts b/tabby-terminal/src/api/interfaces.ts index 76d6acf2..8e7d54c3 100644 --- a/tabby-terminal/src/api/interfaces.ts +++ b/tabby-terminal/src/api/interfaces.ts @@ -24,6 +24,7 @@ export interface Reconnectable { reconnect: () => Promise; } -export function tabIsReconnectable (object: any): object is Reconnectable { +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types +export function isReconnectable (object: any): object is Reconnectable { return 'reconnect' in object } diff --git a/tabby-terminal/src/tabContextMenu.ts b/tabby-terminal/src/tabContextMenu.ts index a4ee56f6..962c12e4 100644 --- a/tabby-terminal/src/tabContextMenu.ts +++ b/tabby-terminal/src/tabContextMenu.ts @@ -1,7 +1,7 @@ import { Injectable, Optional, Inject } from '@angular/core' import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent } from 'tabby-core' import { BaseTerminalTabComponent } from './api/baseTerminalTab.component' -import { tabIsReconnectable } from './api/interfaces' +import { isReconnectable } from './api/interfaces' import { TerminalContextMenuItemProvider } from './api/contextMenuProvider' import { MultifocusService } from './services/multifocus.service' @@ -97,7 +97,7 @@ export class ReconnectContextMenu extends TabContextMenuItemProvider { ) { super() } async getItems (tab: BaseTabComponent): Promise { - if (tabIsReconnectable(tab)) { + if (isReconnectable(tab)) { return [ { label: this.translate.instant('Reconnect'),