deployer: use typescript constructor args
parent
795df06ff1
commit
d2f5ba3ca2
|
@ -99,10 +99,8 @@ function cmd<R>(target: { _commands?: string[] }, propertyKey: string, descripto
|
|||
}
|
||||
|
||||
class MachineInterface {
|
||||
machine: Machine
|
||||
_commands?: string[]
|
||||
constructor(machine: Machine) {
|
||||
this.machine = machine
|
||||
constructor(public machine: Machine) {
|
||||
// hack:
|
||||
delete this._commands
|
||||
}
|
||||
|
|
|
@ -38,9 +38,8 @@ export async function ssh<R>(host: string, cb?: () => Promise<R>) {
|
|||
}
|
||||
|
||||
export class SSH {
|
||||
host: string;
|
||||
child?: ChildProcess | null;
|
||||
constructor(host: string) { this.host = host }
|
||||
constructor(public host: string) { }
|
||||
within<R>(cb: () => Promise<R>): Promise<R> {
|
||||
return within(async () => {
|
||||
$.spawn = (command: string, options: any): any => {
|
||||
|
|
Loading…
Reference in New Issue