/** Utilities and constants used internally. */ import { Fraction } from 'xen-dev-utils'; export declare const NUM_INTERCHANGE_COMPONENTS = 9; export declare function F(n: number, d?: number): Readonly; export declare const ZERO: Readonly; export declare const ONE: Readonly; export declare const NEGATIVE_ONE: Readonly; export declare const HALF: Readonly; export declare const FRACTION_PRIMES: Fraction[]; export declare const TWO: Fraction; export declare const THREE: Fraction; export declare const FIVE: Fraction; export declare const SEVEN: Fraction; export declare const ELEVEN: Fraction; /** * One of the metric prefixes listed here: https://en.wikipedia.org/wiki/Metric_prefix * Goes from quecto = 10^-30 to Quetta = 10^30. */ export type MetricPrefix = 'Q' | 'R' | 'Y' | 'Z' | 'E' | 'P' | 'T' | 'G' | 'M' | 'k' | 'h' | 'da' | '' | 'd' | 'c' | 'm' | 'ยต' | 'n' | 'p' | 'f' | 'a' | 'z' | 'y' | 'r' | 'q'; /** * Obtain the ten's exponent associated with the given prefix. * @param prefix Prefix to find exponent for. * @returns The ten's exponent associated with the prefix. */ export declare function metricExponent(prefix: MetricPrefix): number; /** * One of the binary prefixes listed here: https://en.wikipedia.org/wiki/Binary_prefix * Goes from kibi = 1024 to quebi = 1024^10. */ export type BinaryPrefix = 'Ki' | 'Mi' | 'Gi' | 'Ti' | 'Pi' | 'Ei' | 'Zi' | 'Yi' | 'Ri' | 'Qi'; /** * Obtain the exponent of 1024 associated with the given prefix. * @param prefix Prefix to find exponent for. * @returns The exponent of 1024 associated with the prefix. */ export declare function binaryExponent(prefix: BinaryPrefix): number; /** * Break a steps offset into lifts, ups and steps in that order of preference. * @param total Total steps offset. * @param up Value of the 'up' inflection in steps. * @param lift Value of the 'lift' inflection in steps. * @returns The prefix and postfix for recreating the steps offset according to the given context. */ export declare function countUpsAndLifts(total: number, up: number, lift: number): { ups: number; lifts: number; steps: number; prefix: string; postfix: string; }; export declare const ABSURD_EXPONENT = 3322n; /** * Validate that a BigInt isn't absurdly big. * @param n Integer to validate. * @throws 'Integer overflow.' if the integer has over 1000 digits. */ export declare function validateBigInt(n: bigint): void; /** * Wrapper around `Set.union()` because TypeScript or something. * @param a First set. * @param b Second set. * @returns New set that contains elements of both sets (without duplicates). */ declare function setUnionNative(a: Set, b: Set): Set; export declare const setUnion: typeof setUnionNative; /** * Returns `true` if the specified object has the indicated property as its own property. If the property is inherited, or does not exist, the function returns `false`. * @param object The JavaScript object instance to test. * @param property The `String` name or `Symbol` of the property to test. * @returns `true` if the specified object has directly defined the specified property. Otherwise `false` */ export declare function hasOwn(object: Object, property: PropertyKey): any; export {};