Class Task<T>

Tasks embody individual jobs given to the underlying child processes. Each instance has a promise that will be resolved or rejected based on the result of the task.

Type Parameters

  • T = any

Hierarchy

  • Task

Constructors

  • Type Parameters

    • T = any

    Parameters

    • command: string

      is the value written to stdin to perform the given task.

    • parser: Parser<T>

      is used to parse resulting data from the underlying process to a typed object.

    Returns Task<T>

Properties

command: string
parser: Parser<T>
taskId: number = ...

Accessors

  • get pending(): boolean
  • Returns boolean

  • get promise(): Promise<T>
  • Returns

    the resolution or rejection of this task.

    Returns Promise<T>

  • get runtimeMs(): undefined | number
  • Returns undefined | number

  • get state(): string
  • Returns string

Methods

  • Parameters

    • opts: TaskOptions

    Returns void

  • Parameters

    • buf: string | Buffer

    Returns void

  • Parameters

    • buf: string | Buffer

    Returns void

  • Returns

    true if the wrapped promise was rejected

    Parameters

    • error: Error

    Returns boolean

  • Returns string

Generated using TypeDoc