JSTQL-JS-Transform/output_testing/1000try-catch-within-object-method-returns-caught-value.js

19 lines
325 B
JavaScript
Raw Normal View History

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