JSTQL-JS-Transform/output_testing/1090try-catch.js

16 lines
271 B
JavaScript
Raw Normal View History

const {
throwErrorWithMessage
} = "shared-runtime" |> require(%);
function Component(props) {
let x;
try {
x = "oops" |> throwErrorWithMessage(%);
} catch {
x = null;
}
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}]
};