import { Add, Divide, Factorial, IsGreaterOrEqual, IsGreaterThan, IsLessOrEqual, IsLessThan, LeadingZeros, LeftShift, Modulo, Multiply, Ordinal, Power, RangeType, RightShift, Square, Subtract, ToNumber } from '../types/Number'; import { OptionalParameterFromGeneric } from '../types/misc'; /** * gets a random number in the given range from `Min` to `Max` (inclusive) * @returns anumber where the type is a union of the possible numbers */ export declare const random: (min: Min, max: Max) => RangeType; /** * adds two numbers at compiletime * @example * const foo = add(2, 3) * type Foo = typeof foo //5 */ export declare const add: (num1: N1, num2: N2) => Add; /** * subtracts two numbers at compiletime * @example * const foo = subtract(5, 3) * type Foo = typeof foo //2 */ export declare const subtract: (num1: N1, num2: N2) => Subtract; /** * multiplies two numbers at compiletime * @example * const foo = multiply(2, 3) * type Foo = typeof multiply //6 */ export declare const multiply: (num1: N1, num2: N2) => Multiply; /** * divides two numbers at compiletime * @example * const foo = divide(10, 2) * type Foo = typeof foo //5 */ export declare const divide: (num1: N1, num2: N2) => Divide; export declare const modulo: (num1: N1, num2: N2) => Modulo; /** raises the value of `Num` to the power of the `PowerOf` parameter, at compiletime. */ export declare const power: (num: Num, powerOf: PowerOf) => Power; /** raises the value of `num` to the power of 2, at compiletime. */ export declare const square: (num: T) => Square; export declare const factorial: (num: T) => Factorial; /** * adds leading zeros to the given `number` until it reaches the desired `length` * @example * const foo = leadingZeros(12, 5) //'00012' * const bar = leadingZeros(-12, 5) //'-00012' */ export declare const leadingZeros: (number: Num, length: Size) => LeadingZeros; /** creates a stringified ordinal value for the given number, and at compile-time */ export declare const ordinalNumber: (num: T) => Ordinal; export declare const isGreaterThan: (num1: Num1, num2: Num2) => IsGreaterThan; export declare const isGreaterOrEqual: (num1: Num1, num2: Num2) => IsGreaterOrEqual; export declare const isLessThan: (num1: Num1, num2: Num2) => IsLessThan; export declare const isLessOrEqual: (num1: Num1, num2: Num2) => IsLessOrEqual; /** shifts the bits of `Num` left by the given `Count`, and at compile-time */ export declare const leftShift: (num: Num, count: Count) => LeftShift; /** shifts the bits of `Num` right by the given `Count`, and at compile-time */ export declare const rightShift: (num: Num, count: Count) => RightShift; /** * safely converts a string to a number, without any of the wacky behaviour from `Number` and `parseInt` * @returns `undefined` if the value isn't a string representation of a number (unless `throwError` is `true`), otherwise returns the number * @example * toNumber('') //undefined * toNumber('1asdf', true) //error * toNumber('NaN') //undefined * toNumber('12') //12 * toNumber('Infinity') //Infinity */ export declare const toNumber: (value: Input, ...throwError: OptionalParameterFromGeneric) => ToNumber extends infer Result ? Exclude | (undefined extends Result ? ThrowError extends true ? never : undefined : never) : never; //# sourceMappingURL=Number.d.ts.map