Skip to content

Commit

Permalink
fix: build errors after formatting
Browse files Browse the repository at this point in the history
Note: removes the .event property (not sure what that was used for)
  • Loading branch information
Balte de Wit committed Oct 22, 2020
1 parent c486e8d commit 6bd24a2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/hyperdeck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EventEmitter } from 'events'
import { Socket } from 'net'

import { ResponseCodeType, GetResponseCodeType, AsynchronousCode } from './codes'
import { AbstractCommand, ErrorResponse } from './commands'
import { AbstractCommand } from './commands'
import * as AsyncHandlers from './asyncHandlers'
import { ResponseMessage } from './message'
import { DummyConnectCommand, WatchdogPeriodCommand, PingCommand, QuitCommand } from './commands/internal'
Expand All @@ -18,24 +18,23 @@ class QueuedCommand {
public readonly promise: Promise<any>
public readonly command: AbstractCommand

public resolve: (res: any) => void
public reject: (res: ErrorResponse) => void

constructor(command: AbstractCommand) {
this.command = command
this.promise = new Promise((resolve, reject) => {
this.resolve = resolve
this.reject = reject
})
}

resolve(_res: any) {}
reject(_res: any) {}
}

export class Hyperdeck extends EventEmitter {
DEFAULT_PORT = 9993
RECONNECT_INTERVAL = 5000
DEBUG = false

event: EventEmitter
private socket: Socket
private _connected = false
private _retryConnectTimeout: NodeJS.Timer | null = null
Expand All @@ -48,8 +47,8 @@ export class Hyperdeck extends EventEmitter {
private _parser: MultilineParser

private _connectionActive = false // True when connected/connecting/reconnecting
private _host: string
private _port: number
private _host: string = ''
private _port: number = this.DEFAULT_PORT

constructor(options?: HyperdeckOptions) {
super()
Expand Down

0 comments on commit 6bd24a2

Please sign in to comment.