Skip to content

Commit

Permalink
Rename some files (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheiny authored Aug 11, 2018
1 parent 66ddec3 commit 1ad2a43
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/measure/__test__/testUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Exponent } from "../../exponent";
import { Unit, UnitWithSymbols } from "../types";
import { Unit, UnitWithSymbols } from "../unitTypeArithmetic";

export function addSymbols<U extends Unit>(unit: U): UnitWithSymbols<U> {
const result: UnitWithSymbols = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
NthRootUnit,
RadicandUnit,
Unit,
} from "../types";
} from "../unitTypeArithmetic";

// MultiplyUnits

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dimension, divideUnits, exponentiateUnit, multiplyUnits, nthRootUnit } from "../units";
import { dimension, divideUnits, exponentiateUnit, multiplyUnits, nthRootUnit } from "../unitValueArithmetic";
import { addSymbols } from "./testUtils";

describe("Units", () => {
describe("Unit value arithmetic", () => {
const x = dimension("x");
const y = dimension("y");

Expand Down
2 changes: 1 addition & 1 deletion src/measure/format.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SymbolAndExponent, Unit, UnitWithSymbols } from "./types";
import { SymbolAndExponent, Unit, UnitWithSymbols } from "./unitTypeArithmetic";

export function formatUnit(unit: UnitWithSymbols<Unit>): string {
const sorted = sortDimensions(unit);
Expand Down
2 changes: 1 addition & 1 deletion src/measure/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as SafeMath from "./math";
import { Unit } from "./types";
import { Unit } from "./unitTypeArithmetic";

export { SafeMath, Unit };
export * from "./measure";
12 changes: 10 additions & 2 deletions src/measure/math.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { Dimensionless, Length, PlaneAngle } from "../quantity/quantities";
import { radians } from "../unit/base";
import { Measure, pow } from "./measure";
import { DivideUnits, DivisorUnit, MultiplicandUnit, MultiplyUnits, NthRootUnit, RadicandUnit, Unit } from "./types";
import { nthRootUnit } from "./units";
import {
DivideUnits,
DivisorUnit,
MultiplicandUnit,
MultiplyUnits,
NthRootUnit,
RadicandUnit,
Unit,
} from "./unitTypeArithmetic";
import { nthRootUnit } from "./unitValueArithmetic";

export { pow };

Expand Down
6 changes: 3 additions & 3 deletions src/measure/measure.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Exponent } from "../exponent/generated/common";
import { Exponent } from "../exponent";
import { formatUnit } from "./format";
import {
BaseUnit,
Expand All @@ -9,8 +9,8 @@ import {
MultiplyUnits,
Unit,
UnitWithSymbols,
} from "./types";
import { dimension, divideUnits, exponentiateUnit, multiplyUnits } from "./units";
} from "./unitTypeArithmetic";
import { dimension, divideUnits, exponentiateUnit, multiplyUnits } from "./unitValueArithmetic";

export class Measure<U extends Unit> {
// Construction functions
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SymbolAndExponent,
Unit,
UnitWithSymbols,
} from "./types";
} from "./unitTypeArithmetic";

export function dimension<D extends string>(dim: D, symbol?: string): UnitWithSymbols<{ [K in D]: 1 }> {
// TODO Remove cast to any somehow
Expand Down
2 changes: 1 addition & 1 deletion src/unit/__test__/predefinedUnitTests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Units from "..";
import { Measure } from "../../measure/measure";
import * as Units from "../../unit";
import { meters } from "../base";
import { kilo, micro } from "../metric";

Expand Down
2 changes: 1 addition & 1 deletion src/unit/metric.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Measure } from "../measure/measure";
import { Unit } from "../measure/types";
import { Unit } from "../measure/unitTypeArithmetic";
import * as Quantity from "../quantity/quantities";
import { amperes, candela, kilograms, meters, moles, seconds, steradians } from "./base";

Expand Down

0 comments on commit 1ad2a43

Please sign in to comment.