Type alias UnaryInput<UnaryFunction>

UnaryInput<UnaryFunction>: UnaryFunction extends Unary<infer Input, infer _Output>
    ? Input
    : never

Unary function input type.

Remarks

This type is used to get the input type of a Unary function.

Example

const unary: Unary<number, string> = number => `${number}`;
UnaryInput<typeof unary> // `number`

See

Unary

Type Parameters

  • UnaryFunction extends Unary<never, unknown>

    Type of the unary function to get the input type of.