News for hackers. Stuff that matters.
Re:Convert React JavaScript Code to TypeScript with Proper T... by dvdsgl on Tuesday January 16, 2018 @02:29PM (#16161424)
quicktype (https://app.quicktype.io/) can generate TypeScript types from JSON, Schema, and GraphQL, and it also emits a runtime type representation to do dynamic typechecking. Perhaps this isn't exactly what you're looking for but you could easily modify it to generate whatever code you'd like. We have an experimental Handlebar-based templating feature to make customizing the generated code easier.

There are no comments on this comment yet.