2

JavaScript 代码迁移为 TypeScript 代码工具-TS-Migrate

 2 years ago
source link: http://osp.io/archives/7568
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

JavaScript 代码迁移为 TypeScript 代码工具-TS-Migrate – 开源派

TS-Migrate是Airbnb(爱彼迎)公司开源的前端工具,可将 JavaScript 代码快速迁移为 TypeScript 代码,节省前端工程师的时间成本,统一开发环境。遵守MIT开源协议。

cn_507562.jpg@596w_1l.jpg

TS-Migrate生成的代码仍然需要后续操作来提高安全性。但比从头开始重新写代码要好得多。TS-Migrate被设计为一组插件,因此它可以针对不同的用例进行很好的自定义。可以添加更多插件来解决诸如类型质量改进或与库相关的事件(如Reaction中的属性类型)等问题。用户可以根据自己的需要添加具有不同插件集的自定义配置。这个工具并不能保证实现完全没有错误的转换,但在实际使用过程中,对于一个超过50000行代码、1000个文件的项目,从JavaScript转换到TypeScript使用这个工具基本只需1天。

源码:https://github.com/airbnb/ts-migrate


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK