Function constant

  • Creates a new function that always returns undefined.

    Returns (() => undefined)

    Returns the new constant function.

      • (): undefined
      • Returns undefined

  • Creates a new function that always returns value.

    Type Parameters

    • T

      The type of the value to return.

    Parameters

    • value: T

      The value to return from the new function.

    Returns (() => T)

    Returns the new constant function.

      • (): T
      • Returns T