mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-09 01:51:53 +00:00
lint
This commit is contained in:
@@ -27,7 +27,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
|
||||
title: 'Settings',
|
||||
touchBarNSImage: 'NSTouchBarComposeTemplate',
|
||||
weight: 10,
|
||||
click: () => this.open(),
|
||||
click: (): void => this.open(),
|
||||
}]
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,7 @@ export class HotkeyInputModalComponent {
|
||||
return keys.split('+').map((x) => x.trim())
|
||||
}
|
||||
|
||||
ngOnInit () {
|
||||
ngOnInit (): void {
|
||||
this.keyTimeoutInterval = window.setInterval(() => {
|
||||
if (!this.lastKeyEvent) {
|
||||
return
|
||||
@@ -74,14 +74,14 @@ export class HotkeyInputModalComponent {
|
||||
this.hotkeys.disable()
|
||||
}
|
||||
|
||||
ngOnDestroy () {
|
||||
ngOnDestroy (): void {
|
||||
this.keySubscription.unsubscribe()
|
||||
this.hotkeys.clearCurrentKeystrokes()
|
||||
this.hotkeys.enable()
|
||||
clearInterval(this.keyTimeoutInterval!)
|
||||
}
|
||||
|
||||
close () {
|
||||
close (): void {
|
||||
this.modalInstance.dismiss()
|
||||
}
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ export class MultiHotkeyInputComponent {
|
||||
private ngbModal: NgbModal,
|
||||
) { }
|
||||
|
||||
ngOnInit () {
|
||||
ngOnInit (): void {
|
||||
if (!this.model) {
|
||||
this.model = []
|
||||
}
|
||||
@@ -27,7 +27,7 @@ export class MultiHotkeyInputComponent {
|
||||
this.model = this.model.map(item => typeof item === 'string' ? [item] : item)
|
||||
}
|
||||
|
||||
editItem (item) {
|
||||
editItem (item: string[]): void {
|
||||
this.ngbModal.open(HotkeyInputModalComponent).result.then((value: string[]) => {
|
||||
this.model[this.model.findIndex(x => x === item)] = value
|
||||
this.model = this.model.slice()
|
||||
@@ -35,14 +35,14 @@ export class MultiHotkeyInputComponent {
|
||||
})
|
||||
}
|
||||
|
||||
addItem () {
|
||||
addItem (): void {
|
||||
this.ngbModal.open(HotkeyInputModalComponent).result.then((value: string[]) => {
|
||||
this.model = this.model.concat([value])
|
||||
this.modelChange.emit(this.model)
|
||||
})
|
||||
}
|
||||
|
||||
removeItem (item) {
|
||||
removeItem (item: string[]): void {
|
||||
this.model = this.model.filter(x => x !== item)
|
||||
this.modelChange.emit(this.model)
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
import * as yaml from 'js-yaml'
|
||||
import { Subscription } from 'rxjs'
|
||||
import { Component, Inject, Input, HostBinding, NgZone } from '@angular/core'
|
||||
|
@@ -13,7 +13,7 @@ export class SettingsTabBodyComponent {
|
||||
|
||||
constructor (private componentFactoryResolver: ComponentFactoryResolver) { }
|
||||
|
||||
ngAfterViewInit () {
|
||||
ngAfterViewInit (): void {
|
||||
// run after the change detection finishes
|
||||
setImmediate(() => {
|
||||
this.component = this.placeholder.createComponent(
|
||||
|
Reference in New Issue
Block a user