Skip to main content
Version: Next

withCheckedStorageAccess

Callable

  • withCheckedStorageAccess<T>(checkFunction: () => void, callback: () => Awaitable<T>): Promise<T>

  • Define a storage access checker function that should be used by calls to checkStorageAccess in the callbacks.


    Type parameters

    • T

    Parameters

    • checkFunction: () => void

      The check function that should be invoked by checkStorageAccess calls

    • callback: () => Awaitable<T>

      The code that should be invoked with the checkFunction setting

    Returns Promise<T>