Re:Runtime Introspection of Flow Types in JS
by phpnode on Monday October 03, 2016 @12:28PM
(#12628841)
Cool article. I'm the author of https://github.com/codemix/babel-plugin-typecheck mentioned and the next version of the plugin (WIP) takes this kind of approach, so that you can reference a type at runtime:
Ultimately it should be possible to use this to implement pattern matching in JS based on flow types, for example:
The really hard thing is to do this whilst maintaining perfect compatibility with flow.
[ Parent
| on HN ]
There are no comments on this comment yet.