Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-line comments do not work with function expressions #7

Open
ahamid opened this issue Feb 4, 2015 · 0 comments
Open

Out-of-line comments do not work with function expressions #7

ahamid opened this issue Feb 4, 2015 · 0 comments

Comments

@ahamid
Copy link

ahamid commented Feb 4, 2015

Maybe this is an auto-close if this is due to upstream Flow behavior, but function expressions do not seem to be supported with non-inline block comments. That's unfortunate because those are what CoffeeScript generates.

/* @flow */

/*: (n: number): string */
function named(n) { return 's'; }

/*: (n: number): string */
var aboveline = function(n) { return 's'; };

var aftervar /*: (n: number) => string */ = function(n) { return 's'; };

var beforeline = /*: (n: number): string */ function(n) { return 's'; };

var inline = function(n /*: number*/) /*: string*/ { return 's'; };

named('type error');
inline('type error');
aboveline('no type error');
aftervar('no type error');
beforeline('no type error');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant