Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* render */(function (_self) {
return Curry._1(children, text);
}),
/* initialState */component[/* initialState */10],
return Jest.testAll(name, cases, (function (param) {
return Curry._2(Jest.Expect[/* Operators */24][/* = */5], Jest.Expect[/* expect */0](Curry._1(f, param[0])), param[1]);
}));
}
}), Resync.Future[/* flatMap */9]((function (param) {
if (param.tag) {
return Resync.Future[/* from */3]("oops!");
} else {
return Curry._1(Refetch__Response.text, param[1]);
}
}), Refetch.get("http://httpbin.org/get")));
})).then((function (json) {
var dogs$1 = dogs(json);
return Promise.resolve(Curry._1(self[/* send */3], /* DogsFetched */[dogs$1]));
})).catch((function () {
return Promise.resolve(Curry._1(self[/* send */3], /* DogsFailedToFetch */1));
/* render */(function () {
var match = alignIcon === /* Left */847852583;
var match$1 = alignIcon === /* Right */-57574468;
return React.createElement("button", {
className: Curry._1(Vrroom.Helpers[/* ClassName */5][/* join */0], /* :: */[
TypedGlamor.toString(ButtonStyles.root(style, alignIcon)),
/* :: */[
className,
/* [] */0
]
]),
onClick: (function () {
return Curry._1(onClick, /* () */0);
})
}, match ? makeIcon(icon) : Vrroom.nothing, Vrroom.text(label), match$1 ? makeIcon(icon) : Vrroom.nothing);
}),
/* initialState */component[/* initialState */10],
function invokeCallback(container, messageId, args) {
var match = Belt_HashMapInt.get(container.registry, messageId);
if (match !== undefined) {
return Curry._1(match, args);
} else {
return /* () */0;
}
}
function _wrap(f, x) {
try {
return /* Ok */Block.__(0, [Curry._1(f, x)]);
}
catch (raw_exn){
var exn = Js_exn.internalToOCamlException(raw_exn);
if (exn[0] === Js_exn.$$Error) {
return /* Error */Block.__(1, [exn[1]]);
} else {
throw exn;
}
}
}
];
}
} else {
return /* tuple */[
"Content-Length",
String(param[1])
];
}
} else {
var scheme = param[1];
var value;
if (scheme[0] >= -881134847) {
value = "Bearer " + (String(scheme[1]) + "");
} else {
var match = scheme[1];
var encoded = Curry._1(Refetch__Utils.btoa, "" + (String(match[0]) + (":" + (String(match[1]) + ""))));
value = "Basic " + (String(encoded) + "");
}
return /* tuple */[
"Authorization",
value
];
}
} else if (variant !== -378039458) {
if (variant !== 4099528) {
return Pervasives.failwith("TODO");
} else {
var match$1 = param[1];
return /* tuple */[
match$1[0],
match$1[1]
];
function _nextId(data) {
return Curry._1(Test.Id[/* next */0], Rebase.List[/* map */0]((function (test) {
return test[/* data */0][/* id */0];
}), data[/* tests */1]));
}
function assertComponentInstance(instance, f) {
if (instance.tag) {
return Curry._1(f, instance[0]);
} else {
return Pervasives.invalid_arg("Cannot append children to RawText");
}
}