gentyl
Version:
A Generator That You'll Love
31 lines (30 loc) • 1.19 kB
JavaScript
var Gentyl;
(function (Gentyl) {
function G(components, form, state) {
return new Gentyl.ResolutionNode(components, form, state);
}
Gentyl.G = G;
function F(func, components, state) {
return new Gentyl.ResolutionNode(components, { f: func }, state);
}
Gentyl.F = F;
function I(label, target, inputFunction, resolveFunction, state) {
if (target === void 0) { target = []; }
if (inputFunction === void 0) { inputFunction = Gentyl.Inventory.placeInput; }
if (resolveFunction === void 0) { resolveFunction = Gentyl.Inventory.pickupInput; }
return new Gentyl.ResolutionNode({}, { i: inputFunction, t: target, il: label, f: resolveFunction }, state || { _placed: null });
}
Gentyl.I = I;
function O(label, outputFunction) {
return new Gentyl.ResolutionNode({}, { ol: label, o: outputFunction, f: Gentyl.Inventory.retract }, {});
}
Gentyl.O = O;
function R(reconstructionBundle) {
return new Gentyl.Reconstruction(reconstructionBundle);
}
Gentyl.R = R;
function T(type) {
return new Gentyl.Terminal(type);
}
Gentyl.T = T;
})(Gentyl || (Gentyl = {}));