by danmaz74 · 9y ago · 0 comments
// @param somestring [String] yadda yadda
// @return [Boolean]
function somefunction(somestring) {
// @type [Boolean]
var ret;
...
return ret;
}
This would remove any type of "lock in" if you want to use it...[1]: https://flowtype.org/blog/2015/02/20/Flow-Comments.html
[2]: https://github.com/Khan/aphrodite/blob/master/src/generate.j...
function somefunction(somestring/*: string*/)/*: boolean */ {
var ret/*: boolean */;
...
return ret;
}
(See https://flowtype.org/blog/2015/02/20/Flow-Comments.html)It can also build really nice HTML documentation to.