There isn’t a way to make the grammar interpret the { as an object literal rather than a block statement in this context, but you can use parentheses to force it to be interpreted as an expression:
var x = (t) => ({ n: t });
There isn’t a way to make the grammar interpret the { as an object literal rather than a block statement in this context, but you can use parentheses to force it to be interpreted as an expression:
var x = (t) => ({ n: t });