shajara API Map
    Preparing search index...

    Interface Scope

    Long-lived scope for launching and canceling related routines.

    interface Scope {
        "[asyncDispose]": () => Promise<void>;
        cancel: () => Promise<void>;
        closed: Promise<void>;
        run: <Return>(
            routine: RiteRoutine<Return>,
            options?: RunOptions,
        ) => StatefulPromise<Return>;
        status: LaunchStatus;
    }
    Index
    "[asyncDispose]": () => Promise<void>

    Cancels the scope when used with explicit resource management.

    cancel: () => Promise<void>

    Requests cancellation and waits for this scope to close. Expected cancellation resolves.

    Type Declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves after expected cancellation or rejects when the scope closes with a non-cancellation failure.

    closed: Promise<void>

    Promise that settles when this scope closes.

    run: <Return>(
        routine: RiteRoutine<Return>,
        options?: RunOptions,
    ) => StatefulPromise<Return>

    Starts a routine owned by this scope. Non-cancellation failures from the launched routine propagate to this scope. Cancellation remains local to the launched routine.

    Type Declaration

    Error when this scope is already closed.

    status: LaunchStatus

    Current lifecycle state for this scope.