Closed
Description
TypeScript Version: This is a compiler syntax issue across all versions.
Search Terms:
short circuit arrow function
Code
var functionHandler = {
handleIt: () => {
console.log("HANDLE IT MAN! HANDLE IT!");
}
};
var nextFunctionHandler = {
handleIt: null
};
nextFunctionHandler.handleIt = functionHandler.handleIt || () => {
console.log("We didn't handle it.");
};
Expected behavior:
The short-circuit operator should be agnostic to which type of function follows it (arrow versus traditional).
Actual behavior:
Traditional functions resolve as expected, but arrow functions compile malformed: "();"
Related Issues: I didn't.
Thanks in advance.