1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-22 20:55:03 +03:00

allow type aliases

This commit is contained in:
Eugene Pankov 2021-08-15 14:23:26 +02:00
parent 4fa16c8a20
commit f7b0272be5
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
6 changed files with 7 additions and 7 deletions

View File

@ -125,3 +125,4 @@ rules:
- error - error
- allowAliases: in-unions-and-intersections - allowAliases: in-unions-and-intersections
allowLiterals: always allowLiterals: always
allowCallbacks: always

View File

@ -58,7 +58,7 @@ nodeModule.prototype.require = function (query: string) {
return originalModuleRequire.call(this, query) return originalModuleRequire.call(this, query)
} }
export type ProgressCallback = (current: number, total: number) => void // eslint-disable-line @typescript-eslint/no-type-alias export type ProgressCallback = (current: number, total: number) => void
export function initModuleLookup (userPluginsPath: string): void { export function initModuleLookup (userPluginsPath: string): void {
global['module'].paths.map((x: string) => nodeModule.globalPaths.push(normalizePath(x))) global['module'].paths.map((x: string) => nodeModule.globalPaths.push(normalizePath(x)))

View File

@ -592,7 +592,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
if (zone.type === 'relative') { if (zone.type === 'relative') {
this.add(tab, zone.relativeTo ?? null, zone.side) this.add(tab, zone.relativeTo ?? null, zone.side)
} else if (zone.container) { } else {
this.add(tab, zone.container.children[zone.position], zone.container.orientation === 'h' ? 'r' : 'b') this.add(tab, zone.container.children[zone.position], zone.container.orientation === 'h' ? 'r' : 'b')
} }
this.tabAdopted.next(tab) this.tabAdopted.next(tab)

View File

@ -34,7 +34,7 @@ export class SplitTabDropZoneComponent extends SelfPositioningComponent {
) { ) {
super(element) super(element)
this.subscribeUntilDestroyed(app.tabDragActive$, tab => { this.subscribeUntilDestroyed(app.tabDragActive$, tab => {
this.isActive = !!tab && tab !== this.parent && (this.dropZone.type === 'relative' || tab !== this.dropZone.container?.children[this.dropZone.position]) this.isActive = !!tab && tab !== this.parent && (this.dropZone.type === 'relative' || tab !== this.dropZone.container.children[this.dropZone.position])
this.layout() this.layout()
}) })
} }

View File

@ -2,7 +2,6 @@ import { Injectable, ComponentFactoryResolver, Injector } from '@angular/core'
import { BaseTabComponent } from '../components/baseTab.component' import { BaseTabComponent } from '../components/baseTab.component'
import { TabRecoveryService } from './tabRecovery.service' import { TabRecoveryService } from './tabRecovery.service'
// eslint-disable-next-line @typescript-eslint/no-type-alias
export interface TabComponentType<T extends BaseTabComponent> { export interface TabComponentType<T extends BaseTabComponent> {
// eslint-disable-next-line @typescript-eslint/prefer-function-type // eslint-disable-next-line @typescript-eslint/prefer-function-type
new (...args: any[]): T new (...args: any[]): T

View File

@ -6,9 +6,9 @@ import { Subject, Observable, interval, debounce } from 'rxjs'
import { PassThrough, Readable, Writable } from 'stream' import { PassThrough, Readable, Writable } from 'stream'
import { ReadLine, createInterface as createReadline, clearLine } from 'readline' import { ReadLine, createInterface as createReadline, clearLine } from 'readline'
export type InputMode = null | 'local-echo' | 'readline' | 'readline-hex' // eslint-disable-line @typescript-eslint/no-type-alias export type InputMode = null | 'local-echo' | 'readline' | 'readline-hex'
export type OutputMode = null | 'hex' // eslint-disable-line @typescript-eslint/no-type-alias export type OutputMode = null | 'hex'
export type NewlineMode = null | 'cr' | 'lf' | 'crlf' // eslint-disable-line @typescript-eslint/no-type-alias export type NewlineMode = null | 'cr' | 'lf' | 'crlf'
export interface StreamProcessingOptions { export interface StreamProcessingOptions {
inputMode?: InputMode inputMode?: InputMode