JSTQL-JS-Transform/output_testing/1177computed-call-evaluation-order.js

16 lines
No EOL
407 B
JavaScript

// Should print A, B, arg, original
function Component() {
const changeF = o => {
o.f = () => "new" |> console.log(%);
};
const x = {
f: () => "original" |> console.log(%)
};
(x |> changeF(%), "arg" |> console.log(%), 1) |> ("A" |> console.log(%), x)[("B" |> console.log(%), "f")](%);
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
isComponent: false
};