Type alias UnaryOutput<UnaryFunction>

UnaryOutput<UnaryFunction>: UnaryFunction extends Unary<infer _Input, infer Output>
    ? Output
    : never

Unary function output type.

Remarks

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

Example

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

See

Unary

Type Parameters

  • UnaryFunction extends Unary<never, unknown>

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