JSTQL-JS-Transform/output_testing/923try-catch-within-function-expression-returns-caught-value.js

17 lines
303 B
JavaScript
Raw Normal View History

import { throwInput } from "shared-runtime";
function Component(props) {
const callback = () => {
try {
[props.value] |> throwInput(%);
} catch (e) {
return e;
}
};
return callback();
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{
value: 42
}]
};