Type alias Unary<Input, Output>

Unary<Input, Output>: Function<Single<Input>, Output>

Unary function.

Remarks

Type to represent a function that takes a single argument, ideal for currying.

Example

const unary: Unary<number, number> = number => number + 1;

See

Type Parameters

  • Input

    Type of the input value.

  • Output

    Type of the output value.