@portfolio-resilience/core
    Preparing search index...

    Variable TimeBudgetContextConst

    TimeBudgetContext: {
        isExhausted(): boolean;
        push(budgetMs: number): () => void;
        remainingMs(): number | null;
        run<T>(budgetMs: number, fn: () => T): T;
    } = ...

    Portfolio.Resilience — TypeScript port.

    Public API surface mirroring the C# and Python implementations.

    Type Declaration

    • isExhausted: function
      • Whether the budget has been exhausted.

        Returns boolean

    • push: function
      • Push a time budget (deadline in ms from now). Returns a restore function.

        Parameters

        • budgetMs: number

        Returns () => void

    • remainingMs: function
      • Remaining time in ms, or null if no budget is active.

        Returns number | null

    • run: function
      • Run fn with the given time budget, restoring previous on exit.

        Type Parameters

        • T

        Parameters

        • budgetMs: number
        • fn: () => T

        Returns T