Type alias Power<X, Y>

Power<X, Y>: ParseSignFloatNumber<X> extends infer X extends SignFloatNumber
    ? ParseSignFloatNumber<Y> extends infer Y extends SignFloatNumber
        ? PowerSignFloatNumbers<X, Y> extends infer Result extends SignFloatNumber
            ? StringifySignFloat<Result>
            : never
        : never
    : never

Calculate the power of a number

Type Parameters

  • X extends NumberLike

    The base number

  • Y extends NumberLike

    The exponent

    type Example = Power<"2", "3">
    

Generated using TypeDoc