You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
330 B
JavaScript
18 lines
330 B
JavaScript
"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;
|
|
})
|
|
});
|