Creates a function that always returns the same value

  • Type Parameters

    • T

    Parameters

    • x: T

      Value to return

    • ...args: unknown[]

    Returns () => T

    Function that returns x