UNPKG

900 BTypeScriptView Raw
1/**
2 * A time duration.
3 */
4export declare type DurationUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week';
5/**
6 * Size of information derived from bytes.
7 */
8export declare type InformationUnit = 'bit' | 'byte' | 'kilobyte' | 'kibibyte' | 'megabyte' | 'mebibyte' | 'gigabyte' | 'terabyte' | 'tebibyte' | 'petabyte' | 'exabyte' | 'exbibyte';
9/**
10 * Fractions such as percentages.
11 */
12export declare type FractionUnit = 'ratio' | 'percent';
13/**
14 * Untyped value without a unit.
15 */
16export declare type NoneUnit = '' | 'none';
17declare type LiteralUnion<T extends string> = T | Omit<T, T>;
18export declare type MeasurementUnit = LiteralUnion<DurationUnit | InformationUnit | FractionUnit | NoneUnit>;
19export declare type Measurements = Record<string, {
20 value: number;
21 unit: MeasurementUnit;
22}>;
23export {};
24//# sourceMappingURL=measurement.d.ts.map
\No newline at end of file