Type alias Round<T>

Round<T>: ParseSignFloatNumber<T> extends infer Number extends SignFloatNumber
    ? RoundSignFloatNumber<Number> extends infer RoundNumber extends SignFloatNumber
        ? StringifySignFloat<RoundNumber>
        : never
    : never

Round a number to the nearest integer

Type Parameters

  • T extends NumberLike

    The number to round

    type Example = Round<"3.14">
    

Generated using TypeDoc