occam-verify-cli 1.0.314 → 1.0.316
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.
- package/lib/context/file.js +29 -6
- package/lib/context/release.js +1 -43
- package/lib/dom/declaration/complexType.js +13 -57
- package/lib/dom/declaration/simpleType.js +10 -10
- package/lib/utilities/json.js +24 -1
- package/package.json +6 -6
- package/src/context/file.js +33 -4
- package/src/context/release.js +0 -20
- package/src/dom/declaration/complexType.js +14 -47
- package/src/dom/declaration/simpleType.js +9 -9
- package/src/utilities/json.js +28 -0
package/src/utilities/json.js
CHANGED
|
@@ -372,6 +372,22 @@ export function combinatorsFromJSON(json, context) {
|
|
|
372
372
|
return combinators;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
export function typeAliasesFromJSON(json, context) {
|
|
376
|
+
let { typeAliases } = json;
|
|
377
|
+
|
|
378
|
+
const { TypeAlias } = dom,
|
|
379
|
+
typeAliasesJSON = typeAliases; ///
|
|
380
|
+
|
|
381
|
+
typeAliases = typeAliasesJSON.map((typeAliasJSON) => {
|
|
382
|
+
const json = typeAliasJSON, ///
|
|
383
|
+
typeAlias = TypeAlias.fromJSON(json, context);
|
|
384
|
+
|
|
385
|
+
return typeAlias;
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
return typeAliases;
|
|
389
|
+
}
|
|
390
|
+
|
|
375
391
|
export function constructorsFromJSON(json, context) {
|
|
376
392
|
let { constructors } = json;
|
|
377
393
|
|
|
@@ -680,6 +696,18 @@ export function propertiesToPropertiesJSON(properties) {
|
|
|
680
696
|
return propertiesJSON;
|
|
681
697
|
}
|
|
682
698
|
|
|
699
|
+
export function typeAliasesToTypeAliasesJSON(typeAliases) {
|
|
700
|
+
const typeAliasesJSON = typeAliases.map((typeAlias) => {
|
|
701
|
+
const typeAliasJSON = typeAlias.toJSON();
|
|
702
|
+
|
|
703
|
+
typeAlias = typeAliasJSON; ///
|
|
704
|
+
|
|
705
|
+
return typeAlias;
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
return typeAliasesJSON;
|
|
709
|
+
}
|
|
710
|
+
|
|
683
711
|
export function conjecturesToConjecturesJSON(conjectures) {
|
|
684
712
|
const conjecturesJSON = conjectures.map((conjecture) => {
|
|
685
713
|
const conjectureJSON = conjecture.toJSON();
|