Comment

Comment by TAForObvReasons

With flow you can do one better: type comments! https://flowtype.org/blog/2015/02/20/Flow-Comments.html

You actually wrap the type annotations in comments and flow will recognize them. You can use the source with the type comments in your browser!

As an example, the flow checker will read the annotations from `function f(n/:number/, s/:string/) { ... }` but since they are commented in the source code your JS engine ignores them.

This is amazing for typing existing code, since at every step you are merely inserting comments into your code. And your existing minification step will strip them out :)

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton