quicktype-core 23.0.101 → 23.0.103

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.
@@ -54,7 +54,14 @@ class StringTypes {
54
54
  else if (other.cases !== undefined) {
55
55
  const thisCases = cases;
56
56
  const otherCases = other.cases;
57
- cases = (0, collection_utils_1.mapMap)((0, collection_utils_1.setIntersect)(thisCases.keys(), new Set(otherCases.keys())).entries(), k => Math.min((0, Support_1.defined)(thisCases.get(k)), (0, Support_1.defined)(otherCases.get(k))));
57
+ const intersects = (0, collection_utils_1.setIntersect)(thisCases.keys(), new Set(otherCases.keys()));
58
+ const entries = intersects.size > 0 ? intersects.entries() : new Set(thisCases.keys()).entries();
59
+ cases = (0, collection_utils_1.mapMap)(entries, k => {
60
+ var _a;
61
+ const thisValue = (0, Support_1.defined)(thisCases.get(k));
62
+ const otherValue = (_a = otherCases.get(k)) !== null && _a !== void 0 ? _a : Math.min();
63
+ return Math.min(thisValue, otherValue);
64
+ });
58
65
  }
59
66
  transformations = (0, collection_utils_1.setIntersect)(transformations, other.transformations);
60
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quicktype-core",
3
- "version": "23.0.101",
3
+ "version": "23.0.103",
4
4
  "description": "The quicktype engine as a library",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",