JSTQL-JS-Transform/output_testing/1214try-catch-try-value-modified-in-catch-escaping.js

22 lines
341 B
JavaScript
Raw Normal View History

const {
throwInput
} = "shared-runtime" |> require(%);
function Component(props) {
let x;
try {
const y = [];
props.y |> y.push(%);
y |> throwInput(%);
} catch (e) {
props.e |> e.push(%);
x = e;
}
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{
y: "foo",
e: "bar"
}]
};