Function constant

  • Return a function that always returns a provided value.

    Type Parameters

    • T

    Parameters

    • val: T

    Returns ((...args) => T)

      • (...args): T
      • Parameters

        • Rest ...args: any[]

        Returns T

    Remarks

    This function is useful for eagerly memoizing a value that would otherwise be suspended behind a function.

Generated using TypeDoc