-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
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.
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug