Giter Site home page Giter Site logo

flotate's People

Contributors

cletusw avatar jareware avatar phadej avatar pyryk avatar sota1235 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flotate's Issues

"Fancy annotation" parsing for ES6 methods

One might expect the "fancy annotations" (as in here) to work also on ES6 methods, such as:

var o = {
    /* : (x: string, y: number): boolean */
    foo(x, y) {
        return x.length * y === 5;
    }
};

but they currently don't, due to the comment block being assigned to the AST slightly differently.

See #4 for a related fix.

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

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');

Why not JSDoc?

Any reason why you didn't go with standard JSDoc annotation style for this project?

--json flag for Vim's Syntastic

This is a great idea, thanks for creating it!

I'd love to use it with vim's syntastic plugin, but it relies on the --json flag that flow provides.

Opening this issue to get said flag on the radar.

More examples?

  • What is the annotation for a function that takes zero parameters and returns a boolean or undefined or null or an object?

(Edit: not inline annotation, but above the function.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.