• Returns a function that always returns x.

    Type Parameters

    • T

    Parameters

    • x: T

    Returns (() => T)

      • (): T
      • Returns T

    Example

    constant(42)('anything')
    // => 42

Generated using TypeDoc