Class CommonCommandAsyncAbstract

Description

Command executor common interface

Example

import { CommonCommandSync, CommonCommandAsync } from '@biorate/command';

export class EchoSyncCommand extends CommonCommandSync {
protected command = [`echo #{value}`];

protected override options = { cwd: '/tmp' };

public static override execute(options: { value: string | number }) {
return super.execute(options);
}
}

export class EchoAsyncCommand extends CommonCommandAsync {
protected command = [`echo #{value}`];

protected override options = { cwd: '/tmp' };

public static override execute(options: { value: string | number }) {
return super.execute(options);
}
}

Hierarchy

Constructors

Properties

#config: Config = ...
command: string[]
interpolate: RegExp = ...
options: ExecSyncOptions | ExecOptions = ...
params: Record<string, any> = {}
stderr: boolean = true
cache: WeakMap<typeof Singleton, Singleton> = ...

Accessors

Methods

Generated using TypeDoc