News for hackers. Stuff that matters.
Re:Convert React JavaScript Code to TypeScript with Proper T... by joe-stanton on Tuesday January 16, 2018 @02:29PM (#16161426)
You might be interested in this: https://github.com/gcanti/io-ts and many related projects by Giulio.
Re:Convert React JavaScript Code to TypeScript with Proper T... by joe-stanton on Tuesday January 16, 2018 @02:32PM (#16161459)
Beforehand I built something very similar to what you described for Flow (https://hackernoon.com/runtime-introspection-of-flow-types-d...).

Many others superseded this implementation, the above being one example.

Re:Convert React JavaScript Code to TypeScript with Proper T... by tehno on Tuesday January 16, 2018 @03:13PM (#16161933)
There's also very similar project at https://github.com/pelotom/runtypes that our company uses. Don't have enough experience with it yet to say which is better, io-ts on runtypes.