Skip to content

Commit

Permalink
Remove test code from TS library
Browse files Browse the repository at this point in the history
  • Loading branch information
bekand committed Oct 26, 2023
1 parent 18c2aa3 commit 210d7e4
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/main.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
import * as fs from "fs";
import * as util from "util";
import { Morphir_IR_Distribution as Distribution } from "./generated/morphir/ir/Distribution";
import { Morphir_IR_Module } from "./generated/morphir/ir/Module";
import { Morphir_IR_Package } from "./generated/morphir/ir/Package";
import { Morphir_IR_Path } from "./generated/morphir/ir/Path";
import { Morphir_IR_Type } from "./generated/morphir/ir/Type";
import { Morphir } from "./generated/Morphir";

const fsReadFile = util.promisify(fs.readFile);

fsReadFile("./morphir-ir.json")
.then((content) => {
const ir: Distribution.Distribution = toDistribution(content.toString());
switch (ir.kind) {
case "Library":
ir.arg3.modules.forEach((accessControlledModuleDef, moduleName) => {
console.log(
moduleName.map((n) => n.map(capitalize).join("")).join(".")
);
accessControlledModuleDef.value.types.forEach(
(documentedAccessControlledTypeDef, typeName) => {
console.log(` - ${typeName}`);
}
);
});
}
})
.catch((error) => {
console.error(error);
});

function toDistribution(text: string): Distribution.Distribution {
let data = JSON.parse(text);
Expand Down

0 comments on commit 210d7e4

Please sign in to comment.