lint + refactor

This commit is contained in:
Clem 2023-04-11 22:53:05 +02:00
parent 178e4a6527
commit d1b45812d5
2 changed files with 4 additions and 3 deletions

View File

@ -24,6 +24,7 @@ export interface Reconnectable {
reconnect: () => Promise<void>;
}
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
}

View File

@ -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<MenuItemOptions[]> {
if (tabIsReconnectable(tab)) {
if (isReconnectable(tab)) {
return [
{
label: this.translate.instant('Reconnect'),