Some misc demo code

master
Sven Slootweg 6 years ago
parent fc289ba75e
commit 7d38a678ad

@ -0,0 +1,17 @@
"use strict";
const dm = require("../");
let SomeItem = dm.createType("SomeItem", {
data: dm.string()
});
let SomeType = dm.createType("SomeType", {
values: dm.mapOf(dm.string(), SomeItem)
});
let instance = SomeType({
values: dm.guard([dm.string(), dm.number()], dm.boolean(), function (str, num) {
return true;
})
});
Loading…
Cancel
Save