Function bufferedGate

  • This functions returns a stack that is filled as long as the gate is not activated. Once activated all recorded calls go to given callback and subsequent calls go directly to given callback.

    Type Parameters

    • T

    Parameters

    • callback: ((arg: T) => any)
        • (arg: T): any
        • Parameters

          • arg: T

          Returns any

    Returns {
        activate: (() => void);
        call: ((i: T) => void);
    }

    • activate: (() => void)
        • (): void
        • Returns void

    • call: ((i: T) => void)
        • (i: T): void
        • Parameters

          • i: T

          Returns void

Generated using TypeDoc