|
1 | 1 | import { GenericMeasure, LiftMeasure } from "../measure/genericMeasure"; |
2 | 2 | import { Measure } from "../measure/numberMeasure"; |
3 | 3 | import { DimensionlessUnit } from "../measure/unitTypeArithmetic"; |
4 | | -import * as Base from "./base"; |
| 4 | +import { |
| 5 | + amperes, |
| 6 | + bits, |
| 7 | + candelas, |
| 8 | + kelvin, |
| 9 | + kilograms, |
| 10 | + meters, |
| 11 | + moles, |
| 12 | + radians, |
| 13 | + seconds, |
| 14 | + SIUnitSystem, |
| 15 | + steradians, |
| 16 | +} from "./base"; |
5 | 17 |
|
6 | 18 | // Dimensionless |
7 | 19 |
|
8 | 20 | /** A measure without any unit */ |
9 | | -export type Dimensionless<N = number> = GenericMeasure<N, Base.MetricSystem, DimensionlessUnit<Base.MetricSystem>>; |
10 | | -export const Dimensionless: Dimensionless = Measure.dimensionless(Base.MetricSystem, 1); |
| 21 | +export type Dimensionless<N = number> = GenericMeasure<N, SIUnitSystem, DimensionlessUnit<SIUnitSystem>>; |
| 22 | +export const Dimensionless: Dimensionless = Measure.dimensionless(SIUnitSystem, 1); |
11 | 23 |
|
12 | 24 | // Base units |
13 | 25 |
|
14 | 26 | /** meters */ |
15 | | -export type Length<N = number> = LiftMeasure<typeof Base.meters, N>; |
16 | | -export const Length: Length = Base.meters; |
| 27 | +export type Length<N = number> = LiftMeasure<typeof meters, N>; |
| 28 | +export const Length: Length = meters; |
17 | 29 |
|
18 | 30 | /** kilograms */ |
19 | | -export type Mass<N = number> = LiftMeasure<typeof Base.kilograms, N>; |
20 | | -export const Mass: Mass = Base.kilograms; |
| 31 | +export type Mass<N = number> = LiftMeasure<typeof kilograms, N>; |
| 32 | +export const Mass: Mass = kilograms; |
21 | 33 |
|
22 | 34 | /** seconds */ |
23 | | -export type Time<N = number> = LiftMeasure<typeof Base.seconds, N>; |
24 | | -export const Time: Time = Base.seconds; |
| 35 | +export type Time<N = number> = LiftMeasure<typeof seconds, N>; |
| 36 | +export const Time: Time = seconds; |
25 | 37 |
|
26 | 38 | /** Amperes */ |
27 | | -export type ElectricCurrent<N = number> = LiftMeasure<typeof Base.amperes, N>; |
28 | | -export const ElectricCurrent: ElectricCurrent = Base.amperes; |
| 39 | +export type ElectricCurrent<N = number> = LiftMeasure<typeof amperes, N>; |
| 40 | +export const ElectricCurrent: ElectricCurrent = amperes; |
29 | 41 |
|
30 | 42 | /** Kelvin */ |
31 | | -export type Temperature<N = number> = LiftMeasure<typeof Base.kelvin, N>; |
32 | | -export const Temperature: Temperature = Base.kelvin; |
| 43 | +export type Temperature<N = number> = LiftMeasure<typeof kelvin, N>; |
| 44 | +export const Temperature: Temperature = kelvin; |
33 | 45 |
|
34 | 46 | /** moles */ |
35 | | -export type AmountOfSubstance<N = number> = LiftMeasure<typeof Base.moles, N>; |
36 | | -export const AmountOfSubstance: AmountOfSubstance = Base.moles; |
| 47 | +export type AmountOfSubstance<N = number> = LiftMeasure<typeof moles, N>; |
| 48 | +export const AmountOfSubstance: AmountOfSubstance = moles; |
37 | 49 |
|
38 | 50 | /** candelas */ |
39 | | -export type LuminousIntensity<N = number> = LiftMeasure<typeof Base.candelas, N>; |
40 | | -export const LuminousIntensity: LuminousIntensity = Base.candelas; |
| 51 | +export type LuminousIntensity<N = number> = LiftMeasure<typeof candelas, N>; |
| 52 | +export const LuminousIntensity: LuminousIntensity = candelas; |
41 | 53 |
|
42 | 54 | /** bits */ |
43 | | -export type Memory<N = number> = LiftMeasure<typeof Base.bits, N>; |
44 | | -export const Memory: Memory = Base.bits; |
| 55 | +export type Memory<N = number> = LiftMeasure<typeof bits, N>; |
| 56 | +export const Memory: Memory = bits; |
45 | 57 |
|
46 | 58 | // Angular base units |
47 | 59 |
|
48 | 60 | /** radians */ |
49 | | -export type PlaneAngle<N = number> = LiftMeasure<typeof Base.radians, N>; |
50 | | -export const PlaneAngle: PlaneAngle = Base.radians; |
| 61 | +export type PlaneAngle<N = number> = LiftMeasure<typeof radians, N>; |
| 62 | +export const PlaneAngle: PlaneAngle = radians; |
51 | 63 |
|
52 | 64 | /** steradians */ |
53 | | -export type SolidAngle<N = number> = LiftMeasure<typeof Base.steradians, N>; |
54 | | -export const SolidAngle: SolidAngle = Base.steradians; |
| 65 | +export type SolidAngle<N = number> = LiftMeasure<typeof steradians, N>; |
| 66 | +export const SolidAngle: SolidAngle = steradians; |
55 | 67 |
|
56 | 68 | // Derived units |
57 | 69 |
|
|
0 commit comments