@typed/io
Version:
Runtime IO type system
23 lines • 603 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.recursive = exports.lazy = void 0;
exports.lazy = (f) => exports.recursive(f);
exports.recursive = (f) => {
let _type = null;
const type = {
get name() {
return getType().name;
},
is: (u) => getType().is(u),
decode: (i) => getType().decode(i),
encode: (a) => getType().encode(a),
};
function getType() {
if (!_type) {
_type = f(type);
}
return _type;
}
return type;
};
//# sourceMappingURL=recursive.js.map