Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Airbnb open-sourced their automatic JS->TS migration tool, a project aptly called ts-migrate. Although our codebase was already migrated, the feature to automatically add ts-expect-error comments to all existing errors seemed useful. Using that to ignore existing errors would let us Typescript directly in our CI instead of tsc-silent and prevent new errors from creeping in. Running it took a while, but soon tsc produced a clean run! I added it to our CI, and a simple grep allowed us to keep track of the remaining type errors.
Regexes aren't as powerful as codemods, but they were enough for me. Within a week I had a PR merged that converted the entire react codebase to Typescript.
Related posts
- Declaring static json imported "as const"
- How We Migrated from Javascript and Flow to TypeScript at Osome
- [AskJS] Would a Javascript to Typescript Converter Be Useful?
- Converting a React project to TypeScript - Avoid pain by using correct file extension
- Does anyone who of a plugin for VSCode or Webstorm which can generate interfaces/types based on the props & state used in React component?