Some misc demo code
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…
Reference in New Issue