ts-migrate

A tool to help migrate JavaScript code quickly and conveniently to TypeScript

Github星跟踪图

ts-migrate

ts-migrate is a tool for helping migrate code to TypeScript.
It takes a JavaScript, or a partial TypeScript, project in and gives a compiling TypeScript project out.

ts-migrate is intended to accelerate the TypeScript migration process. The resulting code will pass the build, but a followup is required to improve type safety. There will be lots of // @ts-expect-error, and any that will need to be fixed over time. In general, it is a lot nicer than starting from scratch.

ts-migrate is designed as a set of plugins so that it can be pretty customizable for different use-cases. Potentially, more plugins can be added for addressing things like improvements of type quality or libraries-related things (like prop-types in React).

Plugins are combined into migration configs. We currently have two main migration configs:

  • for the main JavaScript → TypeScript migration
  • for the reignore script

These configs can be moved out of the default script, and people can add custom configs with a different set of plugins for their needs.

You can find instructions on how to install and run ts-migrate in the main package. If you find any issues or have ideas for improvements, we welcome your contributions!

Check out the blog post about ts-migrate!

Published Packages, Folder, Version, Package, ------, -------, -------, packages/ts-migrate, npm version, ts-migrate, packages/ts-migrate-plugins, npm version, ts-migrate-plugins, packages/ts-migrate-server, npm version, ts-migrate-server, # Unpublished Packages, Folder, Description, ------, -----------, packages/ts-migrate-example, basic example of usage of the ts-migrate-server with a writing a custom simple plugin, # Authors

License

MIT, see LICENSE for details.

主要指标

概览
名称与所有者airbnb/ts-migrate
主编程语言TypeScript
编程语言JavaScript (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2019-12-05 23:36:40
推送于2024-08-28 03:38:26
最后一次提交2024-06-22 21:55:54
发布数36
最新版本名称v0.1.35 (发布于 2022-11-07 19:38:46)
第一版名称v0.1.0 (发布于 2020-08-17 11:19:45)
用户参与
星数5.6k
关注者数40
派生数227
提交数282
已启用问题?
问题数105
打开的问题数48
拉请求数99
打开的拉请求数3
关闭的拉请求数7
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?