Type alias Truncate<T>

Truncate<T>: ParseSignFloatNumber<T> extends infer Number extends SignFloatNumber
    ? StringifySignFloat<TruncateSignFloatNumber<Number>>
    : never

Truncate a number to the nearest integer

Type Parameters

  • T extends NumberLike

    The number to truncate

    type Example = Truncate<"3.14">
    

Generated using TypeDoc