Like provideAsync in AtomicProvider but assumes only one call so there are no race conditions. Additionally offers a withValue helper useful for triggering procesess on a provided object.

  • Type Parameters

    • T extends (() => any)

    Parameters

    • mapStore: Baggage
    • key: string
    • makeValue: T
    • OptionalwithValue: ((value: Awaited<ReturnType<T>>) => void)
        • (value): void
        • Parameters

          • value: Awaited<ReturnType<T>>

          Returns void

    Returns Promise<Awaited<ReturnType<T>>>