private service constructors

This commit is contained in:
Eugene Pankov 2020-03-16 22:30:11 +01:00
parent 9e862772eb
commit baaebb402e
21 changed files with 21 additions and 21 deletions

View file

@ -63,7 +63,7 @@ export abstract class BaseTabComponent {
get destroyed$ (): Observable<void> { return this.destroyed }
get recoveryStateChangedHint$ (): Observable<void> { return this.recoveryStateChangedHint }
constructor () {
protected constructor () {
this.focused$.subscribe(() => {
this.hasFocus = true
})

View file

@ -13,7 +13,7 @@ import { ToolbarButton, ToolbarButtonProvider } from '../api'
export class StartPageComponent {
version: string
constructor (
private constructor (
private config: ConfigService,
private domSanitizer: DomSanitizer,
public homeBase: HomeBaseService,

View file

@ -10,7 +10,7 @@ import { AppService } from '../services/app.service'
styles: [require('./windowControls.component.scss')],
})
export class WindowControlsComponent {
constructor (public hostApp: HostAppService, public app: AppService) { }
private constructor (public hostApp: HostAppService, public app: AppService) { }
async closeWindow () {
this.app.closeWindow()

View file

@ -67,7 +67,7 @@ export class AppService {
get ready$ (): Observable<void> { return this.ready }
/** @hidden */
constructor (
private constructor (
private config: ConfigService,
private hostApp: HostAppService,
private tabRecovery: TabRecoveryService,

View file

@ -102,7 +102,7 @@ export class ConfigService {
get changed$ (): Observable<void> { return this.changed }
/** @hidden */
constructor (
private constructor (
electron: ElectronService,
private hostApp: HostAppService,
@Inject(ConfigProvider) configProviders: ConfigProvider[],

View file

@ -6,7 +6,7 @@ import { HostAppService, Bounds } from '../services/hostApp.service'
@Injectable({ providedIn: 'root' })
export class DockingService {
/** @hidden */
constructor (
private constructor (
private electron: ElectronService,
private config: ConfigService,
private hostApp: HostAppService,

View file

@ -25,7 +25,7 @@ export class ElectronService {
private electron: any
/** @hidden */
constructor () {
private constructor () {
this.electron = require('electron')
this.remote = this.electron.remote
this.app = this.remote.app

View file

@ -11,7 +11,7 @@ export class HomeBaseService {
mixpanel: any
/** @hidden */
constructor (
private constructor (
private electron: ElectronService,
private config: ConfigService,
) {

View file

@ -65,7 +65,7 @@ export class LogService {
private log: any
/** @hidden */
constructor (electron: ElectronService) {
private constructor (electron: ElectronService) {
this.log = initializeWinston(electron)
}

View file

@ -33,7 +33,7 @@ export class ShellIntegrationService {
command: 'paste "%V"',
},
]
constructor (
private constructor (
private electron: ElectronService,
private hostApp: HostAppService,
) {

View file

@ -10,7 +10,7 @@ export class TabRecoveryService {
logger: Logger
enabled = false
constructor (
private constructor (
@Inject(TabRecoveryProvider) private tabRecoveryProviders: TabRecoveryProvider[],
private config: ConfigService,
log: LogService

View file

@ -8,7 +8,7 @@ export type TabComponentType = new (...args: any[]) => BaseTabComponent
@Injectable({ providedIn: 'root' })
export class TabsService {
/** @hidden */
constructor (
private constructor (
private componentFactoryResolver: ComponentFactoryResolver,
private injector: Injector,
private tabRecovery: TabRecoveryService,

View file

@ -7,7 +7,7 @@ export class ThemesService {
private styleElement: HTMLElement|null = null
/** @hidden */
constructor (
private constructor (
private config: ConfigService,
@Inject(Theme) private themes: Theme[],
) {

View file

@ -14,7 +14,7 @@ export class TouchbarService {
private tabSegments: SegmentedControlSegment[] = []
private nsImageCache: {[id: string]: Electron.NativeImage} = {}
constructor (
private constructor (
private app: AppService,
private hostApp: HostAppService,
@Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],

View file

@ -21,7 +21,7 @@ export class UpdaterService {
private updateURL: string
private autoUpdater: AppUpdater
constructor (
private constructor (
log: LogService,
private electron: ElectronService,
private config: ConfigService,

View file

@ -34,7 +34,7 @@ export class PluginManagerService {
private npmReady: Promise<void>
private npm: any
constructor (
private constructor (
log: LogService,
) {
this.logger = log.create('pluginManager')

View file

@ -127,7 +127,7 @@ import { XTermFrontend, XTermWebGLFrontend } from './frontends/xtermFrontend'
],
})
export default class TerminalModule { // eslint-disable-line @typescript-eslint/no-extraneous-class
constructor (
private constructor (
app: AppService,
config: ConfigService,
hotkeys: HotkeysService,

View file

@ -332,7 +332,7 @@ export class SessionsService {
logger: Logger
private lastID = 0
constructor (
private constructor (
log: LogService,
) {
require('../bufferizedPTY')(nodePTY) // eslint-disable-line @typescript-eslint/no-var-requires

View file

@ -19,7 +19,7 @@ export class TerminalService {
get shells$ (): Observable<Shell[]> { return this.shells }
/** @hidden */
constructor (
private constructor (
private app: AppService,
private config: ConfigService,
private uac: UACService,

View file

@ -10,7 +10,7 @@ export class TerminalFrontendService {
private containers = new WeakMap<BaseSession, Frontend>()
/** @hidden */
constructor (
private constructor (
private config: ConfigService,
private themes: ThemesService,
private hotkeys: HotkeysService,

View file

@ -8,7 +8,7 @@ import { SessionOptions } from '../api/interfaces'
export class UACService {
isAvailable = false
constructor (
private constructor (
private electron: ElectronService,
) {
this.isAvailable = isWindowsBuild(WIN_BUILD_CONPTY_SUPPORTED)