JSTQL-JS-Transform/output_testing/1178capturing-function-conditional-capture-mutate.js

16 lines
313 B
JavaScript
Raw Normal View History

// @debug
function component(a, b) {
let z = {
a
};
let y = b;
let x = function () {
if (y) {
// we don't know for sure this mutates, so we should assume
// that there is no mutation so long as `x` isn't called
// during render
z |> maybeMutate(%);
}
};
return x;
}