Type Parameters

  • T

Constructors

Properties

Accessors

Methods

Constructors

Properties

onUpdated: Emitter<AsyncResourceContext<T>> = ...

Accessors

Methods

  • get the resource value, refreshing it if needed

    note: this method still might return null if the resource wasn't ever cached yet, and the underlying call to fetcher failed

    Returns Promise<null | T>

  • update the resource

    Parameters

    • force: boolean = false

      whether to force the update even if the resource hasn't expired yet

    Returns Promise<void>