@itwin/ecschema-metadata 4.0.0-dev.8 → 4.0.0-dev.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/lib/cjs/Constants.d.ts +23 -23
  3. package/lib/cjs/Constants.js +33 -33
  4. package/lib/cjs/Constants.js.map +1 -1
  5. package/lib/cjs/Context.d.ts +139 -139
  6. package/lib/cjs/Context.js +204 -204
  7. package/lib/cjs/DelayedPromise.d.ts +88 -88
  8. package/lib/cjs/DelayedPromise.d.ts.map +1 -1
  9. package/lib/cjs/DelayedPromise.js +91 -91
  10. package/lib/cjs/DelayedPromise.js.map +1 -1
  11. package/lib/cjs/Deserialization/AbstractParser.d.ts +45 -45
  12. package/lib/cjs/Deserialization/AbstractParser.d.ts.map +1 -1
  13. package/lib/cjs/Deserialization/AbstractParser.js +11 -11
  14. package/lib/cjs/Deserialization/Helper.d.ts +251 -251
  15. package/lib/cjs/Deserialization/Helper.js +843 -843
  16. package/lib/cjs/Deserialization/JsonParser.d.ts +165 -165
  17. package/lib/cjs/Deserialization/JsonParser.js +680 -680
  18. package/lib/cjs/Deserialization/JsonProps.d.ts +282 -282
  19. package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
  20. package/lib/cjs/Deserialization/JsonProps.js +9 -9
  21. package/lib/cjs/Deserialization/SchemaGraphUtil.d.ts +34 -34
  22. package/lib/cjs/Deserialization/SchemaGraphUtil.js +77 -77
  23. package/lib/cjs/Deserialization/XmlParser.d.ts +85 -85
  24. package/lib/cjs/Deserialization/XmlParser.js +973 -973
  25. package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts +54 -54
  26. package/lib/cjs/Deserialization/XmlSerializationUtils.js +174 -174
  27. package/lib/cjs/ECName.d.ts +30 -30
  28. package/lib/cjs/ECName.js +85 -85
  29. package/lib/cjs/ECObjects.d.ts +162 -162
  30. package/lib/cjs/ECObjects.js +453 -453
  31. package/lib/cjs/Exception.d.ts +43 -43
  32. package/lib/cjs/Exception.js +84 -84
  33. package/lib/cjs/Interfaces.d.ts +66 -66
  34. package/lib/cjs/Interfaces.d.ts.map +1 -1
  35. package/lib/cjs/Interfaces.js +9 -9
  36. package/lib/cjs/Metadata/Class.d.ts +243 -243
  37. package/lib/cjs/Metadata/Class.js +558 -558
  38. package/lib/cjs/Metadata/Class.js.map +1 -1
  39. package/lib/cjs/Metadata/Constant.d.ts +64 -64
  40. package/lib/cjs/Metadata/Constant.js +123 -123
  41. package/lib/cjs/Metadata/Constant.js.map +1 -1
  42. package/lib/cjs/Metadata/CustomAttribute.d.ts +23 -23
  43. package/lib/cjs/Metadata/CustomAttribute.js +27 -27
  44. package/lib/cjs/Metadata/CustomAttributeClass.d.ts +39 -39
  45. package/lib/cjs/Metadata/CustomAttributeClass.js +68 -68
  46. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  47. package/lib/cjs/Metadata/EntityClass.d.ts +77 -77
  48. package/lib/cjs/Metadata/EntityClass.js +230 -230
  49. package/lib/cjs/Metadata/Enumeration.d.ts +86 -86
  50. package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
  51. package/lib/cjs/Metadata/Enumeration.js +159 -159
  52. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  53. package/lib/cjs/Metadata/Format.d.ts +98 -98
  54. package/lib/cjs/Metadata/Format.js +242 -242
  55. package/lib/cjs/Metadata/InvertedUnit.d.ts +49 -49
  56. package/lib/cjs/Metadata/InvertedUnit.js +97 -97
  57. package/lib/cjs/Metadata/KindOfQuantity.d.ts +65 -65
  58. package/lib/cjs/Metadata/KindOfQuantity.js +225 -225
  59. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  60. package/lib/cjs/Metadata/Mixin.d.ts +54 -54
  61. package/lib/cjs/Metadata/Mixin.js +113 -113
  62. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  63. package/lib/cjs/Metadata/OverrideFormat.d.ts +55 -55
  64. package/lib/cjs/Metadata/OverrideFormat.js +88 -88
  65. package/lib/cjs/Metadata/Phenomenon.d.ts +33 -33
  66. package/lib/cjs/Metadata/Phenomenon.js +59 -59
  67. package/lib/cjs/Metadata/Property.d.ts +197 -197
  68. package/lib/cjs/Metadata/Property.d.ts.map +1 -1
  69. package/lib/cjs/Metadata/Property.js +491 -491
  70. package/lib/cjs/Metadata/Property.js.map +1 -1
  71. package/lib/cjs/Metadata/PropertyCategory.d.ts +39 -39
  72. package/lib/cjs/Metadata/PropertyCategory.js +61 -61
  73. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  74. package/lib/cjs/Metadata/RelationshipClass.d.ts +152 -152
  75. package/lib/cjs/Metadata/RelationshipClass.js +349 -349
  76. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  77. package/lib/cjs/Metadata/Schema.d.ts +291 -291
  78. package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
  79. package/lib/cjs/Metadata/Schema.js +520 -520
  80. package/lib/cjs/Metadata/Schema.js.map +1 -1
  81. package/lib/cjs/Metadata/SchemaItem.d.ts +61 -61
  82. package/lib/cjs/Metadata/SchemaItem.js +136 -136
  83. package/lib/cjs/Metadata/Unit.d.ts +76 -76
  84. package/lib/cjs/Metadata/Unit.js +162 -162
  85. package/lib/cjs/Metadata/Unit.js.map +1 -1
  86. package/lib/cjs/Metadata/UnitSystem.d.ts +20 -20
  87. package/lib/cjs/Metadata/UnitSystem.js +29 -29
  88. package/lib/cjs/PropertyTypes.d.ts +49 -49
  89. package/lib/cjs/PropertyTypes.js +91 -91
  90. package/lib/cjs/PropertyTypes.js.map +1 -1
  91. package/lib/cjs/SchemaJsonLocater.d.ts +34 -34
  92. package/lib/cjs/SchemaJsonLocater.d.ts.map +1 -1
  93. package/lib/cjs/SchemaJsonLocater.js +42 -42
  94. package/lib/cjs/SchemaKey.d.ts +110 -110
  95. package/lib/cjs/SchemaKey.js +219 -219
  96. package/lib/cjs/SchemaLoader.d.ts +23 -23
  97. package/lib/cjs/SchemaLoader.js +47 -47
  98. package/lib/cjs/SchemaPartVisitorDelegate.d.ts +274 -274
  99. package/lib/cjs/SchemaPartVisitorDelegate.js +212 -212
  100. package/lib/cjs/UnitConversion/Graph.d.ts +34 -34
  101. package/lib/cjs/UnitConversion/Graph.js +83 -83
  102. package/lib/cjs/UnitConversion/Parser.d.ts +8 -8
  103. package/lib/cjs/UnitConversion/Parser.js +42 -42
  104. package/lib/cjs/UnitConversion/UnitConversion.d.ts +45 -45
  105. package/lib/cjs/UnitConversion/UnitConversion.js +77 -77
  106. package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
  107. package/lib/cjs/UnitConversion/UnitConverter.d.ts +39 -39
  108. package/lib/cjs/UnitConversion/UnitConverter.js +116 -116
  109. package/lib/cjs/UnitConversion/UnitTree.d.ts +43 -43
  110. package/lib/cjs/UnitConversion/UnitTree.js +169 -169
  111. package/lib/cjs/UnitProvider/SchemaUnitProvider.d.ts +77 -77
  112. package/lib/cjs/UnitProvider/SchemaUnitProvider.js +234 -236
  113. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  114. package/lib/cjs/Validation/SchemaWalker.d.ts +23 -23
  115. package/lib/cjs/Validation/SchemaWalker.js +53 -53
  116. package/lib/cjs/ecschema-metadata.d.ts +51 -51
  117. package/lib/cjs/ecschema-metadata.js +100 -96
  118. package/lib/cjs/ecschema-metadata.js.map +1 -1
  119. package/lib/cjs/utils/SchemaGraph.d.ts +25 -25
  120. package/lib/cjs/utils/SchemaGraph.js +65 -65
  121. package/package.json +12 -12
@@ -1,84 +1,84 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- // Following https://github.com/dagrejs/graphlib/blob/master/lib/graph.js
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Graph = void 0;
9
- /** @internal */
10
- class Graph {
11
- constructor() {
12
- this._edgeKeyDelim = "\x01";
13
- this._label = "";
14
- this._nodeCount = 0;
15
- this._edgeCount = 0;
16
- this.setGraph = (label) => {
17
- this._label = label;
18
- return this;
19
- };
20
- this.graph = () => {
21
- return this._label;
22
- };
23
- this.nodeCount = () => {
24
- return this._nodeCount;
25
- };
26
- this.nodes = () => {
27
- return Object.keys(this._nodes);
28
- };
29
- this.setNode = (nodeKey, nodeValue) => {
30
- if (nodeKey in this._nodes) {
31
- this._nodes[nodeKey] = nodeValue;
32
- return;
33
- }
34
- this._nodes[nodeKey] = nodeValue;
35
- this._outEdges[nodeKey] = {};
36
- ++this._nodeCount;
37
- };
38
- this.node = (nodeKey) => {
39
- return this._nodes[nodeKey];
40
- };
41
- this.hasNode = (nodeKey) => {
42
- return nodeKey in this._nodes;
43
- };
44
- this.edgeCount = () => {
45
- return this._edgeCount;
46
- };
47
- this.edges = () => {
48
- return Object.values(this._edgeObjs);
49
- };
50
- this.setEdge = (v, w, value) => {
51
- const edgeId = v + this._edgeKeyDelim + w + this._edgeKeyDelim;
52
- if (edgeId in this._edgeLabels) {
53
- // this._edgeLabels[edgeId] = value;
54
- // Update exponent, specific to this graph's use case
55
- this._edgeLabels[edgeId].exponent += value.exponent;
56
- return;
57
- }
58
- this._edgeLabels[edgeId] = value;
59
- const edgeObj = {
60
- v,
61
- w,
62
- };
63
- this._edgeObjs[edgeId] = edgeObj;
64
- // setNode should have ran first, so this.outEdges[v] shouldn't be undefined
65
- this._outEdges[v][edgeId] = edgeObj;
66
- this._edgeCount++;
67
- };
68
- this.edge = (v, w) => {
69
- const edgeId = v + this._edgeKeyDelim + w + this._edgeKeyDelim;
70
- return this._edgeLabels[edgeId];
71
- };
72
- this.outEdges = (v) => {
73
- const outV = this._outEdges[v];
74
- const edges = Object.values(outV);
75
- return edges;
76
- };
77
- this._nodes = {};
78
- this._edgeObjs = {};
79
- this._edgeLabels = {};
80
- this._outEdges = {};
81
- }
82
- }
83
- exports.Graph = Graph;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ // Following https://github.com/dagrejs/graphlib/blob/master/lib/graph.js
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.Graph = void 0;
9
+ /** @internal */
10
+ class Graph {
11
+ constructor() {
12
+ this._edgeKeyDelim = "\x01";
13
+ this._label = "";
14
+ this._nodeCount = 0;
15
+ this._edgeCount = 0;
16
+ this.setGraph = (label) => {
17
+ this._label = label;
18
+ return this;
19
+ };
20
+ this.graph = () => {
21
+ return this._label;
22
+ };
23
+ this.nodeCount = () => {
24
+ return this._nodeCount;
25
+ };
26
+ this.nodes = () => {
27
+ return Object.keys(this._nodes);
28
+ };
29
+ this.setNode = (nodeKey, nodeValue) => {
30
+ if (nodeKey in this._nodes) {
31
+ this._nodes[nodeKey] = nodeValue;
32
+ return;
33
+ }
34
+ this._nodes[nodeKey] = nodeValue;
35
+ this._outEdges[nodeKey] = {};
36
+ ++this._nodeCount;
37
+ };
38
+ this.node = (nodeKey) => {
39
+ return this._nodes[nodeKey];
40
+ };
41
+ this.hasNode = (nodeKey) => {
42
+ return nodeKey in this._nodes;
43
+ };
44
+ this.edgeCount = () => {
45
+ return this._edgeCount;
46
+ };
47
+ this.edges = () => {
48
+ return Object.values(this._edgeObjs);
49
+ };
50
+ this.setEdge = (v, w, value) => {
51
+ const edgeId = v + this._edgeKeyDelim + w + this._edgeKeyDelim;
52
+ if (edgeId in this._edgeLabels) {
53
+ // this._edgeLabels[edgeId] = value;
54
+ // Update exponent, specific to this graph's use case
55
+ this._edgeLabels[edgeId].exponent += value.exponent;
56
+ return;
57
+ }
58
+ this._edgeLabels[edgeId] = value;
59
+ const edgeObj = {
60
+ v,
61
+ w,
62
+ };
63
+ this._edgeObjs[edgeId] = edgeObj;
64
+ // setNode should have ran first, so this.outEdges[v] shouldn't be undefined
65
+ this._outEdges[v][edgeId] = edgeObj;
66
+ this._edgeCount++;
67
+ };
68
+ this.edge = (v, w) => {
69
+ const edgeId = v + this._edgeKeyDelim + w + this._edgeKeyDelim;
70
+ return this._edgeLabels[edgeId];
71
+ };
72
+ this.outEdges = (v) => {
73
+ const outV = this._outEdges[v];
74
+ const edges = Object.values(outV);
75
+ return edges;
76
+ };
77
+ this._nodes = {};
78
+ this._edgeObjs = {};
79
+ this._edgeLabels = {};
80
+ this._outEdges = {};
81
+ }
82
+ }
83
+ exports.Graph = Graph;
84
84
  //# sourceMappingURL=Graph.js.map
@@ -1,9 +1,9 @@
1
- /** @internal */
2
- export interface DefinitionFragment {
3
- name: string;
4
- exponent: number;
5
- constant: boolean;
6
- }
7
- /** @internal */
8
- export declare function parseDefinition(definition: string): Map<string, DefinitionFragment>;
1
+ /** @internal */
2
+ export interface DefinitionFragment {
3
+ name: string;
4
+ exponent: number;
5
+ constant: boolean;
6
+ }
7
+ /** @internal */
8
+ export declare function parseDefinition(definition: string): Map<string, DefinitionFragment>;
9
9
  //# sourceMappingURL=Parser.d.ts.map
@@ -1,43 +1,43 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseDefinition = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const expressionRgx = /^(([A-Z]\w*:)?([A-Z]\w*|\[([A-Z]\w*:)?[A-Z]\w*\])(\(-?\d+\))?(\*(?!$)|$))+$/i;
9
- const tokenRgx = /(?:(\[)?((?:[A-Z]\w*:)?[A-Z]\w*)\]?)(?:\((-?\d+)\))?/i;
10
- const sp = "*";
11
- /** @internal */
12
- var Tokens;
13
- (function (Tokens) {
14
- Tokens[Tokens["Bracket"] = 1] = "Bracket";
15
- Tokens[Tokens["Word"] = 2] = "Word";
16
- Tokens[Tokens["Exponent"] = 3] = "Exponent";
17
- })(Tokens || (Tokens = {}));
18
- /** @internal */
19
- function parseDefinition(definition) {
20
- const unitMap = new Map();
21
- if (expressionRgx.test(definition)) {
22
- for (const unit of definition.split(sp)) {
23
- const tokens = unit.split(tokenRgx);
24
- const name = tokens[Tokens.Word];
25
- const exponent = tokens[Tokens.Exponent] ? Number(tokens[Tokens.Exponent]) : 1;
26
- const constant = tokens[Tokens.Bracket] !== undefined;
27
- if (unitMap.has(name)) {
28
- const currentDefinition = unitMap.get(name);
29
- currentDefinition.exponent += exponent;
30
- unitMap.set(name, currentDefinition);
31
- }
32
- else {
33
- unitMap.set(name, { name, exponent, constant });
34
- }
35
- }
36
- return unitMap;
37
- }
38
- else {
39
- throw new Error("Invalid definition expression.");
40
- }
41
- }
42
- exports.parseDefinition = parseDefinition;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseDefinition = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const expressionRgx = /^(([A-Z]\w*:)?([A-Z]\w*|\[([A-Z]\w*:)?[A-Z]\w*\])(\(-?\d+\))?(\*(?!$)|$))+$/i;
9
+ const tokenRgx = /(?:(\[)?((?:[A-Z]\w*:)?[A-Z]\w*)\]?)(?:\((-?\d+)\))?/i;
10
+ const sp = "*";
11
+ /** @internal */
12
+ var Tokens;
13
+ (function (Tokens) {
14
+ Tokens[Tokens["Bracket"] = 1] = "Bracket";
15
+ Tokens[Tokens["Word"] = 2] = "Word";
16
+ Tokens[Tokens["Exponent"] = 3] = "Exponent";
17
+ })(Tokens || (Tokens = {}));
18
+ /** @internal */
19
+ function parseDefinition(definition) {
20
+ const unitMap = new Map();
21
+ if (expressionRgx.test(definition)) {
22
+ for (const unit of definition.split(sp)) {
23
+ const tokens = unit.split(tokenRgx);
24
+ const name = tokens[Tokens.Word];
25
+ const exponent = tokens[Tokens.Exponent] ? Number(tokens[Tokens.Exponent]) : 1;
26
+ const constant = tokens[Tokens.Bracket] !== undefined;
27
+ if (unitMap.has(name)) {
28
+ const currentDefinition = unitMap.get(name);
29
+ currentDefinition.exponent += exponent;
30
+ unitMap.set(name, currentDefinition);
31
+ }
32
+ else {
33
+ unitMap.set(name, { name, exponent, constant });
34
+ }
35
+ }
36
+ return unitMap;
37
+ }
38
+ else {
39
+ throw new Error("Invalid definition expression.");
40
+ }
41
+ }
42
+ exports.parseDefinition = parseDefinition;
43
43
  //# sourceMappingURL=Parser.js.map
@@ -1,46 +1,46 @@
1
- import { Constant } from "../Metadata/Constant";
2
- import { Unit } from "../Metadata/Unit";
3
- /**
4
- * Class used for storing calculated conversion between two Units [[UnitConverter.calculateConversion]] and converting values from one Unit to another [[UnitConverter.evaluate]]
5
- * @internal
6
- */
7
- export declare class UnitConversion {
8
- readonly factor: number;
9
- readonly offset: number;
10
- constructor(factor?: number, offset?: number);
11
- /**
12
- * Converts x using UnitConversion
13
- * @param x Input magnitude to be converted
14
- * @returns Output magnitude after conversion
15
- */
16
- evaluate(x: number): number;
17
- /**
18
- * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly
19
- * @internal
20
- */
21
- inverse(): UnitConversion;
22
- /**
23
- * Combines two UnitConversions
24
- * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated
25
- * @internal
26
- */
27
- compose(conversion: UnitConversion): UnitConversion;
28
- /**
29
- * Multiples two UnitConversions together to calculate factor during reducing
30
- * @internal
31
- */
32
- multiply(conversion: UnitConversion): UnitConversion;
33
- /**
34
- * Raise UnitConversion's factor with power exponent to calculate factor during reducing
35
- * @internal
36
- */
37
- raise(power: number): UnitConversion;
38
- /** @internal */
39
- static identity: UnitConversion;
40
- /**
41
- * Returns UnitConversion with unit's numerator and denominator in factor and unit's offset in offset for reducing
42
- * @internal
43
- */
44
- static from(unit: Unit | Constant): UnitConversion;
45
- }
1
+ import { Constant } from "../Metadata/Constant";
2
+ import { Unit } from "../Metadata/Unit";
3
+ /**
4
+ * Class used for storing calculated conversion between two Units [[UnitConverter.calculateConversion]] and converting values from one Unit to another [[UnitConverter.evaluate]]
5
+ * @internal
6
+ */
7
+ export declare class UnitConversion {
8
+ readonly factor: number;
9
+ readonly offset: number;
10
+ constructor(factor?: number, offset?: number);
11
+ /**
12
+ * Converts x using UnitConversion
13
+ * @param x Input magnitude to be converted
14
+ * @returns Output magnitude after conversion
15
+ */
16
+ evaluate(x: number): number;
17
+ /**
18
+ * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly
19
+ * @internal
20
+ */
21
+ inverse(): UnitConversion;
22
+ /**
23
+ * Combines two UnitConversions
24
+ * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated
25
+ * @internal
26
+ */
27
+ compose(conversion: UnitConversion): UnitConversion;
28
+ /**
29
+ * Multiples two UnitConversions together to calculate factor during reducing
30
+ * @internal
31
+ */
32
+ multiply(conversion: UnitConversion): UnitConversion;
33
+ /**
34
+ * Raise UnitConversion's factor with power exponent to calculate factor during reducing
35
+ * @internal
36
+ */
37
+ raise(power: number): UnitConversion;
38
+ /** @internal */
39
+ static identity: UnitConversion;
40
+ /**
41
+ * Returns UnitConversion with unit's numerator and denominator in factor and unit's offset in offset for reducing
42
+ * @internal
43
+ */
44
+ static from(unit: Unit | Constant): UnitConversion;
45
+ }
46
46
  //# sourceMappingURL=UnitConversion.d.ts.map
@@ -1,78 +1,78 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnitConversion = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const almostEqual = require("almost-equal");
9
- const ECObjects_1 = require("../ECObjects");
10
- /**
11
- * Class used for storing calculated conversion between two Units [[UnitConverter.calculateConversion]] and converting values from one Unit to another [[UnitConverter.evaluate]]
12
- * @internal
13
- */
14
- class UnitConversion {
15
- constructor(factor = 1.0, offset = 0.0) {
16
- this.factor = factor;
17
- this.offset = offset;
18
- }
19
- /**
20
- * Converts x using UnitConversion
21
- * @param x Input magnitude to be converted
22
- * @returns Output magnitude after conversion
23
- */
24
- evaluate(x) {
25
- return this.factor * x + this.offset;
26
- }
27
- /**
28
- * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly
29
- * @internal
30
- */
31
- inverse() {
32
- const inverseFactor = 1.0 / this.factor;
33
- return new UnitConversion(inverseFactor, -this.offset * inverseFactor);
34
- }
35
- /**
36
- * Combines two UnitConversions
37
- * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated
38
- * @internal
39
- */
40
- compose(conversion) {
41
- return new UnitConversion(this.factor * conversion.factor, conversion.factor * this.offset + conversion.offset);
42
- }
43
- /**
44
- * Multiples two UnitConversions together to calculate factor during reducing
45
- * @internal
46
- */
47
- multiply(conversion) {
48
- if (almostEqual(conversion.offset, 0.0) && almostEqual(this.offset, 0.0))
49
- return new UnitConversion(this.factor * conversion.factor, 0.0);
50
- throw new Error("Cannot multiply two maps with non-zero offsets");
51
- }
52
- /**
53
- * Raise UnitConversion's factor with power exponent to calculate factor during reducing
54
- * @internal
55
- */
56
- raise(power) {
57
- if (almostEqual(power, 1.0))
58
- return new UnitConversion(this.factor, this.offset);
59
- else if (almostEqual(power, 0.0))
60
- return new UnitConversion(1.0, 0.0);
61
- if (almostEqual(this.offset, 0.0))
62
- return new UnitConversion(this.factor ** power, 0.0);
63
- throw new Error("Cannot raise map with non-zero offset");
64
- }
65
- /**
66
- * Returns UnitConversion with unit's numerator and denominator in factor and unit's offset in offset for reducing
67
- * @internal
68
- */
69
- static from(unit) {
70
- if (unit.schemaItemType === ECObjects_1.SchemaItemType.Unit)
71
- return new UnitConversion(unit.denominator / unit.numerator, -unit.offset);
72
- return new UnitConversion(unit.denominator / unit.numerator, 0.0);
73
- }
74
- }
75
- exports.UnitConversion = UnitConversion;
76
- /** @internal */
77
- UnitConversion.identity = new UnitConversion();
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnitConversion = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const almostEqual = require("almost-equal");
9
+ const ECObjects_1 = require("../ECObjects");
10
+ /**
11
+ * Class used for storing calculated conversion between two Units [[UnitConverter.calculateConversion]] and converting values from one Unit to another [[UnitConverter.evaluate]]
12
+ * @internal
13
+ */
14
+ class UnitConversion {
15
+ constructor(factor = 1.0, offset = 0.0) {
16
+ this.factor = factor;
17
+ this.offset = offset;
18
+ }
19
+ /**
20
+ * Converts x using UnitConversion
21
+ * @param x Input magnitude to be converted
22
+ * @returns Output magnitude after conversion
23
+ */
24
+ evaluate(x) {
25
+ return this.factor * x + this.offset;
26
+ }
27
+ /**
28
+ * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly
29
+ * @internal
30
+ */
31
+ inverse() {
32
+ const inverseFactor = 1.0 / this.factor;
33
+ return new UnitConversion(inverseFactor, -this.offset * inverseFactor);
34
+ }
35
+ /**
36
+ * Combines two UnitConversions
37
+ * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated
38
+ * @internal
39
+ */
40
+ compose(conversion) {
41
+ return new UnitConversion(this.factor * conversion.factor, conversion.factor * this.offset + conversion.offset);
42
+ }
43
+ /**
44
+ * Multiples two UnitConversions together to calculate factor during reducing
45
+ * @internal
46
+ */
47
+ multiply(conversion) {
48
+ if (almostEqual(conversion.offset, 0.0) && almostEqual(this.offset, 0.0))
49
+ return new UnitConversion(this.factor * conversion.factor, 0.0);
50
+ throw new Error("Cannot multiply two maps with non-zero offsets");
51
+ }
52
+ /**
53
+ * Raise UnitConversion's factor with power exponent to calculate factor during reducing
54
+ * @internal
55
+ */
56
+ raise(power) {
57
+ if (almostEqual(power, 1.0))
58
+ return new UnitConversion(this.factor, this.offset);
59
+ else if (almostEqual(power, 0.0))
60
+ return new UnitConversion(1.0, 0.0);
61
+ if (almostEqual(this.offset, 0.0))
62
+ return new UnitConversion(this.factor ** power, 0.0);
63
+ throw new Error("Cannot raise map with non-zero offset");
64
+ }
65
+ /**
66
+ * Returns UnitConversion with unit's numerator and denominator in factor and unit's offset in offset for reducing
67
+ * @internal
68
+ */
69
+ static from(unit) {
70
+ if (unit.schemaItemType === ECObjects_1.SchemaItemType.Unit)
71
+ return new UnitConversion(unit.denominator / unit.numerator, -unit.offset);
72
+ return new UnitConversion(unit.denominator / unit.numerator, 0.0);
73
+ }
74
+ }
75
+ /** @internal */
76
+ UnitConversion.identity = new UnitConversion();
77
+ exports.UnitConversion = UnitConversion;
78
78
  //# sourceMappingURL=UnitConversion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnitConversion.js","sourceRoot":"","sources":["../../../src/UnitConversion/UnitConversion.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,4CAA4C;AAG5C,4CAA8C;AAE9C;;;GAGG;AACH,MAAa,cAAc;IACzB,YAA4B,SAAiB,GAAG,EAAkB,SAAiB,GAAG;QAA1D,WAAM,GAAN,MAAM,CAAc;QAAkB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE1F;;;;OAIG;IACI,QAAQ,CAAC,CAAS;QACvB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,OAAO;QACZ,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;QACxC,OAAO,IAAI,cAAc,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,OAAO,CAAC,UAA0B;QACvC,OAAO,IAAI,cAAc,CACvB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,EAC/B,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CACpD,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,UAA0B;QACxC,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;YACtE,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAElE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAa;QACxB,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC;YACzB,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;aACjD,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC;YAC9B,OAAO,IAAI,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAEtC,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;YAC/B,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,GAAG,CAAC,CAAC;QAEvD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,IAAI,CAAC,IAAqB;QACtC,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,IAAI;YAC7C,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE7E,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACpE,CAAC;;AAxEH,wCAyEC;AAbC,gBAAgB;AACF,uBAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport * as almostEqual from \"almost-equal\";\r\nimport { Constant } from \"../Metadata/Constant\";\r\nimport { Unit } from \"../Metadata/Unit\";\r\nimport { SchemaItemType } from \"../ECObjects\";\r\n\r\n/**\r\n * Class used for storing calculated conversion between two Units [[UnitConverter.calculateConversion]] and converting values from one Unit to another [[UnitConverter.evaluate]]\r\n * @internal\r\n */\r\nexport class UnitConversion {\r\n constructor(public readonly factor: number = 1.0, public readonly offset: number = 0.0) {}\r\n\r\n /**\r\n * Converts x using UnitConversion\r\n * @param x Input magnitude to be converted\r\n * @returns Output magnitude after conversion\r\n */\r\n public evaluate(x: number): number {\r\n return this.factor * x + this.offset;\r\n }\r\n\r\n /**\r\n * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly\r\n * @internal\r\n */\r\n public inverse(): UnitConversion {\r\n const inverseFactor = 1.0 / this.factor;\r\n return new UnitConversion(inverseFactor, -this.offset * inverseFactor);\r\n }\r\n\r\n /**\r\n * Combines two UnitConversions\r\n * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated\r\n * @internal\r\n */\r\n public compose(conversion: UnitConversion): UnitConversion {\r\n return new UnitConversion(\r\n this.factor * conversion.factor,\r\n conversion.factor * this.offset + conversion.offset\r\n );\r\n }\r\n\r\n /**\r\n * Multiples two UnitConversions together to calculate factor during reducing\r\n * @internal\r\n */\r\n public multiply(conversion: UnitConversion): UnitConversion {\r\n if (almostEqual(conversion.offset, 0.0) && almostEqual(this.offset, 0.0))\r\n return new UnitConversion(this.factor * conversion.factor, 0.0);\r\n\r\n throw new Error(\"Cannot multiply two maps with non-zero offsets\");\r\n }\r\n\r\n /**\r\n * Raise UnitConversion's factor with power exponent to calculate factor during reducing\r\n * @internal\r\n */\r\n public raise(power: number): UnitConversion {\r\n if (almostEqual(power, 1.0))\r\n return new UnitConversion(this.factor, this.offset);\r\n else if (almostEqual(power, 0.0))\r\n return new UnitConversion(1.0, 0.0);\r\n\r\n if (almostEqual(this.offset, 0.0))\r\n return new UnitConversion(this.factor ** power, 0.0);\r\n\r\n throw new Error(\"Cannot raise map with non-zero offset\");\r\n }\r\n\r\n /** @internal */\r\n public static identity = new UnitConversion();\r\n\r\n /**\r\n * Returns UnitConversion with unit's numerator and denominator in factor and unit's offset in offset for reducing\r\n * @internal\r\n */\r\n public static from(unit: Unit | Constant): UnitConversion {\r\n if (unit.schemaItemType === SchemaItemType.Unit)\r\n return new UnitConversion(unit.denominator / unit.numerator, -unit.offset);\r\n\r\n return new UnitConversion(unit.denominator / unit.numerator, 0.0);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"UnitConversion.js","sourceRoot":"","sources":["../../../src/UnitConversion/UnitConversion.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,4CAA4C;AAG5C,4CAA8C;AAE9C;;;GAGG;AACH,MAAa,cAAc;IACzB,YAA4B,SAAiB,GAAG,EAAkB,SAAiB,GAAG;QAA1D,WAAM,GAAN,MAAM,CAAc;QAAkB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE1F;;;;OAIG;IACI,QAAQ,CAAC,CAAS;QACvB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,OAAO;QACZ,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;QACxC,OAAO,IAAI,cAAc,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,OAAO,CAAC,UAA0B;QACvC,OAAO,IAAI,cAAc,CACvB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,EAC/B,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CACpD,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,UAA0B;QACxC,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;YACtE,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAElE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAa;QACxB,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC;YACzB,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;aACjD,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC;YAC9B,OAAO,IAAI,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAEtC,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;YAC/B,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,GAAG,CAAC,CAAC;QAEvD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,IAAI,CAAC,IAAqB;QACtC,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,IAAI;YAC7C,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE7E,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACpE,CAAC;;AAZD,gBAAgB;AACF,uBAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;AA7DnC,wCAAc","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport * as almostEqual from \"almost-equal\";\r\nimport { Constant } from \"../Metadata/Constant\";\r\nimport { Unit } from \"../Metadata/Unit\";\r\nimport { SchemaItemType } from \"../ECObjects\";\r\n\r\n/**\r\n * Class used for storing calculated conversion between two Units [[UnitConverter.calculateConversion]] and converting values from one Unit to another [[UnitConverter.evaluate]]\r\n * @internal\r\n */\r\nexport class UnitConversion {\r\n constructor(public readonly factor: number = 1.0, public readonly offset: number = 0.0) {}\r\n\r\n /**\r\n * Converts x using UnitConversion\r\n * @param x Input magnitude to be converted\r\n * @returns Output magnitude after conversion\r\n */\r\n public evaluate(x: number): number {\r\n return this.factor * x + this.offset;\r\n }\r\n\r\n /**\r\n * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly\r\n * @internal\r\n */\r\n public inverse(): UnitConversion {\r\n const inverseFactor = 1.0 / this.factor;\r\n return new UnitConversion(inverseFactor, -this.offset * inverseFactor);\r\n }\r\n\r\n /**\r\n * Combines two UnitConversions\r\n * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated\r\n * @internal\r\n */\r\n public compose(conversion: UnitConversion): UnitConversion {\r\n return new UnitConversion(\r\n this.factor * conversion.factor,\r\n conversion.factor * this.offset + conversion.offset\r\n );\r\n }\r\n\r\n /**\r\n * Multiples two UnitConversions together to calculate factor during reducing\r\n * @internal\r\n */\r\n public multiply(conversion: UnitConversion): UnitConversion {\r\n if (almostEqual(conversion.offset, 0.0) && almostEqual(this.offset, 0.0))\r\n return new UnitConversion(this.factor * conversion.factor, 0.0);\r\n\r\n throw new Error(\"Cannot multiply two maps with non-zero offsets\");\r\n }\r\n\r\n /**\r\n * Raise UnitConversion's factor with power exponent to calculate factor during reducing\r\n * @internal\r\n */\r\n public raise(power: number): UnitConversion {\r\n if (almostEqual(power, 1.0))\r\n return new UnitConversion(this.factor, this.offset);\r\n else if (almostEqual(power, 0.0))\r\n return new UnitConversion(1.0, 0.0);\r\n\r\n if (almostEqual(this.offset, 0.0))\r\n return new UnitConversion(this.factor ** power, 0.0);\r\n\r\n throw new Error(\"Cannot raise map with non-zero offset\");\r\n }\r\n\r\n /** @internal */\r\n public static identity = new UnitConversion();\r\n\r\n /**\r\n * Returns UnitConversion with unit's numerator and denominator in factor and unit's offset in offset for reducing\r\n * @internal\r\n */\r\n public static from(unit: Unit | Constant): UnitConversion {\r\n if (unit.schemaItemType === SchemaItemType.Unit)\r\n return new UnitConversion(unit.denominator / unit.numerator, -unit.offset);\r\n\r\n return new UnitConversion(unit.denominator / unit.numerator, 0.0);\r\n }\r\n}\r\n"]}
@@ -1,40 +1,40 @@
1
- import { SchemaContext } from "../Context";
2
- import { UnitConversion } from "./UnitConversion";
3
- /**
4
- * Class constructed with SchemaContext and used to calculate [[UnitConversion]] between Units
5
- * @internal
6
- */
7
- export declare class UnitConverter {
8
- private readonly _context;
9
- private _uGraph;
10
- /**
11
- * Create Converter context
12
- * @param _context SchemaContext with contexts added to it.
13
- */
14
- constructor(_context: SchemaContext);
15
- /**
16
- * Find conversion between from and to units, formatted {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}
17
- * @param fromUnit SchemaItem full name of source unit
18
- * @param toUnit SchemaItem full name of target unit
19
- * @returns [[UnitConversion]] converting fromUnit -> toUnit with a factor and an offset
20
- * @throws Error if from and to Units' SchemaItem is not found in Schema or Schema prefix is not found in SchemaContext
21
- * @throws Error if from and to Units do not belong to the same phenomenon
22
- * @throws Error if definitions' SchemaItems cannot be found in its own or referenced Schemas
23
- * @throws Error if base units of source and target unit do not match
24
- */
25
- calculateConversion(fromUnit: string, toUnit: string): Promise<UnitConversion>;
26
- /**
27
- * @param from Source unit converted from
28
- * @param to Target unit converted to
29
- * @internal
30
- */
31
- private processUnits;
32
- /**
33
- * Check if fromBaseUnits's base units and exponents matches toBaseUnits's
34
- * @param fromBaseUnits Map of base units for source unit
35
- * @param toBaseUnits Map of base units for target unit
36
- * @internal
37
- */
38
- private checkBaseUnitsMatch;
39
- }
1
+ import { SchemaContext } from "../Context";
2
+ import { UnitConversion } from "./UnitConversion";
3
+ /**
4
+ * Class constructed with SchemaContext and used to calculate [[UnitConversion]] between Units
5
+ * @internal
6
+ */
7
+ export declare class UnitConverter {
8
+ private readonly _context;
9
+ private _uGraph;
10
+ /**
11
+ * Create Converter context
12
+ * @param _context SchemaContext with contexts added to it.
13
+ */
14
+ constructor(_context: SchemaContext);
15
+ /**
16
+ * Find conversion between from and to units, formatted {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}
17
+ * @param fromUnit SchemaItem full name of source unit
18
+ * @param toUnit SchemaItem full name of target unit
19
+ * @returns [[UnitConversion]] converting fromUnit -> toUnit with a factor and an offset
20
+ * @throws Error if from and to Units' SchemaItem is not found in Schema or Schema prefix is not found in SchemaContext
21
+ * @throws Error if from and to Units do not belong to the same phenomenon
22
+ * @throws Error if definitions' SchemaItems cannot be found in its own or referenced Schemas
23
+ * @throws Error if base units of source and target unit do not match
24
+ */
25
+ calculateConversion(fromUnit: string, toUnit: string): Promise<UnitConversion>;
26
+ /**
27
+ * @param from Source unit converted from
28
+ * @param to Target unit converted to
29
+ * @internal
30
+ */
31
+ private processUnits;
32
+ /**
33
+ * Check if fromBaseUnits's base units and exponents matches toBaseUnits's
34
+ * @param fromBaseUnits Map of base units for source unit
35
+ * @param toBaseUnits Map of base units for target unit
36
+ * @internal
37
+ */
38
+ private checkBaseUnitsMatch;
39
+ }
40
40
  //# sourceMappingURL=UnitConverter.d.ts.map