flowts
flowts copied to clipboard
Babel parse error
Not sure if it is valid to use multiline comments like this, any idea what could cause this?
export const foo = (): string[] =>
/**
* Multiline comment
**/
bar();
looks to be caused by prettier - filed bug report here: https://github.com/prettier/prettier/issues/11100
while it is not fixed - one option is to not use prettier --no-prettier(but if you use it after - that still would be a problem),
or to refactor code before converting to use return statement - following will work fine:
const test = () => {
/**
* Multiline comment
**/
return bar();
}