1 |
|
2 |
|
3 |
|
4 | export type DurationUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week';
|
5 |
|
6 |
|
7 |
|
8 | export type InformationUnit = 'bit' | 'byte' | 'kilobyte' | 'kibibyte' | 'megabyte' | 'mebibyte' | 'gigabyte' | 'terabyte' | 'tebibyte' | 'petabyte' | 'exabyte' | 'exbibyte';
|
9 |
|
10 |
|
11 |
|
12 | export type FractionUnit = 'ratio' | 'percent';
|
13 |
|
14 |
|
15 |
|
16 | export type NoneUnit = '' | 'none';
|
17 | type LiteralUnion<T extends string> = T | Omit<T, T>;
|
18 | export type MeasurementUnit = LiteralUnion<DurationUnit | InformationUnit | FractionUnit | NoneUnit>;
|
19 | export type Measurements = Record<string, {
|
20 | value: number;
|
21 | unit: MeasurementUnit;
|
22 | }>;
|
23 | export {};
|
24 |
|
\ | No newline at end of file |