A11 TypeScript API - v0.2.1
    Preparing search index...

    Interface ActionSessionContext

    Session operations an Action needs for dispatch and lifetime tracking.

    interface ActionSessionContext {
        acquireActionSlot?(
            nested: boolean,
            signal?: AbortSignal,
        ): Promise<Status>;
        getActionRegistry(): ActionRegistryLike | null;
        getNodeMap(): NodeMap;
        releaseActionSlot?(nested: boolean): void;
        send(message: WireMessage, streamId?: string): Status;
        trackAction(action: Action): Status;
        untrackAction(action: Action): void;
    }
    Index
    • Await a root/nested concurrency slot before invoking a handler.

      Parameters

      • nested: boolean
      • Optionalsignal: AbortSignal

      Returns Promise<Status>

    • Release the concurrency slot after the handler unwinds.

      Parameters

      • nested: boolean

      Returns void

    • Remove a terminal action from session accounting.

      Parameters

      Returns void