Function withExpiration

  • Wraps data with expiration time

    Type Parameters

    • T

    Parameters

    • data: T

      the data

    • expiration: number

      the expiration time

    Returns WithExpiration<T>