UNPKG

@typed/io

Version:

Runtime IO type system

20 lines 485 B
export const lazy = (f) => recursive(f); export const 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