fynjs API
    Preparing search index...

    Interface Signal<T>

    A signal for work that completes outside the sequence, such as an event.

    Declare it in config.signals to register it, which makes it an obligation: the run cannot finish until it settles. Wait for it with .awaiting(name).

    interface Signal<T = unknown> {
        defer: DeferObject;
        pending(): boolean;
        reject(err: Error): void;
        resolve(value: T): void;
    }

    Type Parameters

    • T = unknown
    Index

    The underlying defer, for interop with the positional API.

    • True until the signal settles.

      Returns boolean

    • Settle the signal with a failure, which fails the run.

      Parameters

      • err: Error

      Returns void

    • Settle the signal with a value.

      Parameters

      • value: T

      Returns void