/
current.ts
43 lines (38 loc) · 981 Bytes
/
current.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { CurrentTranslationEnum } from '../i18n';
import { MeasureDefinition, Unit } from '../type';
import { CurrentUnit } from './type';
export enum CurrentEnum {
AMPERE = 'A',
MILLIAMPERE = 'mA',
KILOAMPERE = 'kA'
}
const metric: Record<CurrentUnit, Unit> = {
[CurrentEnum.AMPERE]: {
name: {
singular: CurrentTranslationEnum.SINGULAR_AMPERE,
plural: CurrentTranslationEnum.PLURAL_AMPERE
},
anchor: 1
},
[CurrentEnum.MILLIAMPERE]: {
name: {
singular: CurrentTranslationEnum.SINGULAR_MILLIAMPERE,
plural: CurrentTranslationEnum.PLURAL_MILLIAMPERE
},
anchor: 1e-3
},
[CurrentEnum.KILOAMPERE]: {
name: {
singular: CurrentTranslationEnum.SINGULAR_KILOAMPERE,
plural: CurrentTranslationEnum.PLURAL_KILOAMPERE
},
anchor: 1e3
}
};
export type CurrentSystems = 'metric';
const current: MeasureDefinition<CurrentSystems, CurrentUnit> = {
systems: {
metric
}
};
export default current;