Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Space

Hierarchy

  • Space

Implemented by

Index

Properties

Readonly isRunning

isRunning: boolean

Returns true if this space is running.

Readonly stdout

stdout: Readable

Methods

on

  • The message event is emitted when the program inside this space sends a message via process.send().

    The error event is emitted when the program inside this space throws an Error.

    The rejection event is emitted when the program inside this space occurs an unhandled promise rejection.

    Parameters

    Returns this

  • Parameters

    Returns this

  • Parameters

    Returns this

send

  • send(message: unknown): void
  • Sends a message to the program inside this space.

    Parameters

    • message: unknown

      Any type of value can be sent. In the some space types, the message is restricted by JSON.stringify; recursive data and non-JSON-serializable values cannot to be sent.

    Returns void

stop

  • stop(): Promise<void>
  • Stops this space.

    Returns Promise<void>

waitMessage

  • Returns a promise object that resolves when the given predicate returns true.

    Parameters

    Returns Promise<void>

waitStart

  • waitStart(): Promise<void>
  • Waits for that the worker has started.

    Returns Promise<void>

waitStop

  • waitStop(): Promise<void>
  • Waits for that the program inside this space stops.

    Returns Promise<void>

Generated using TypeDoc