Status: refused by design
{} is not FunctionalScript. () => {} is valid JavaScript, and fjs compile refuses it by design: the demo below shows what it prints.
A JavaScript function whose block can fall through its closing brace answers undefined, silently. FunctionalScript requires an explicit result or an end that cannot be reached by normal completion: return, throw, a terminating switch, or a terminal unconditional loop. What a function answers is still explicit (functions).
The row st.body-end of refused constructs registers the refusal, and functions gives its reason.
/** @type {() => undefined} */
const f = () => {};
export default f();
The demo on this page compiles sample.mjs, the module above, with this build's fjs compile, and shows the line it prints and the token it refuses. Below that it shows what JavaScript answers for the same module: undefined.
End the block with what the function answers, as alternative.f.js does:
/** @type {() => undefined} */
const f = () => {
return undefined;
};
export default f();
It answers undefined. The answer is the same; now it is written.
Today fjs compile prints unexpected token at the refused token. The demo proposes what it should print instead: the reason at the same token, what JavaScript does there, and the allowed spelling, the line alternative.f.js writes, as help. The page compiles the alternative too, so the suggestion is one the compiler accepts.