If I have code like this:
let hello = (greeting:string = ' world') : string => {
console.log('hello' + greeting);
};
hello();
I get this error when I run: node_modules/eslint/bin/eslint.js .:
Parsing error: Assigning to rvalue
If I don't use arrow functions it works fine, ie:
let hello = function (greeting:string = ' world') : string {
console.log('hello' + greeting);
};
hello();
I created a repo to help reproduce it:
https://github.com/davidjnelson/flow-issues
For now I'll workaround by not using arrow functions and manually binding the this context when using default parameters, but I'd sure like them together :-) Thanks so much!