interface Spawn<T> {
    [toStringTag]: string;
    always(callback: (() => void)): DeferredPromise<T>;
    catch(callback: ((ex: SpawnException, data: T) => void | PromiseLike<void>)): Spawn<T>;
    close(): void;
    close(problem?: string): void;
    done(callback: ((data: T) => void)): DeferredPromise<T>;
    fail(callback: ((exc: Error) => void)): DeferredPromise<T>;
    finally(onfinally?: null | (() => void)): Promise<T>;
    input(message: T, stream?: boolean): DeferredPromise<T>;
    progress(callback: ((message: T, cancel: (() => void)) => void)): DeferredPromise<T>;
    stream(callback: ((data: T) => void)): DeferredPromise<T>;
    then(callback: ((data: T, message: string) => void | PromiseLike<void>)): Spawn<T>;
}

Type Parameters

  • T

Hierarchy-Diagram

UML class diagram of Spawn
Legend
icon for an interface in the UML class diagram interface
icon for a public method in the UML class diagram public method

Hierarchy (view full)

Properties

[toStringTag]: string

Methods

  • Returns void

  • Parameters

    • Optional problem: string

    Returns void

  • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

    Parameters

    • Optional onfinally: null | (() => void)

      The callback to execute when the Promise is settled (fulfilled or rejected).

    Returns Promise<T>

    A Promise for the completion of the callback.

  • Parameters

    • message: T
    • Optional stream: boolean

    Returns DeferredPromise<T>

  • Parameters

    • callback: ((message: T, cancel: (() => void)) => void)
        • (message: T, cancel: (() => void)): void
        • Parameters

          • message: T
          • cancel: (() => void)
              • (): void
              • Returns void

          Returns void

    Returns DeferredPromise<T>

  • Parameters

    • callback: ((data: T) => void)
        • (data: T): void
        • Parameters

          • data: T

          Returns void

    Returns DeferredPromise<T>

  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Parameters

    • callback: ((data: T, message: string) => void | PromiseLike<void>)

      The callback to execute when the Promise is resolved.

    Returns Spawn<T>

    A Promise for the completion of which ever callback is executed.