网络科技

    今日:501| 主题:244642
收藏本版
互联网、科技极客的综合动态。

[其他] Go With the Flow – A Static Type Checking Tool for JavaScript

[复制链接]
怪我长得丑 发表于 前天 03:34
51 5

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

Go With the Flow – A Static Type Checking Tool for JavaScript-1 (challenge,features,complex,members,change)


  Static Type Checking is Life, Static Type Checking is Love

  Javascript has been a hot topic for web developers for some time now.
  It’s fast, runs everywhere and offers many wonderful frameworks such as Angular and React.
  However, its lack of static typing can be a real pain for developers, bugs only appear at runtime, are hard to find and code refactoring is a real challenge.
  This is where static type checkers such as TypeScript and Flow come into play with their main features being:
  
       
  • Helping to catch errors early, close to the root cause and at buildtime   
  • Improving code readability and maintainability  
  When Should You Use a Type Checker?

  
       
  • For long and complex projects   
  • If there is a chance you will have to refactor it at some point   
  • If team members change regularly  
  If you are sick and tired of random errors induced by typing errors, you should definitely join the static type checking club!
  What Does Flow Bring to the Game?

  What Flow Is

  Flow is a JavaScript static type checker. The open source project has 9,000+ stars on GitHub at the time this article is being written.
  The project is active – more than 30 commits are merged in average every week with bug fixing and new features.

Go With the Flow – A Static Type Checking Tool for JavaScript-2 (challenge,features,complex,members,change)

  It was introduced by Facebook in 2014 with two main features:
  
       
  • Finding type errors in your code   
  • Offering a static typing syntax  
  How does it work?

  Flow is a checker while TypeScript is a compiler.
  Flow works in two different ways:
  
       
  • You specify to the tool the types you expect, and it checks your code based on this as shown below  

123下一页
友荐云推荐




上一篇:IoT Botnets Are Growing—and Up for Hire
下一篇:Instagram Advertisers Switch From Celebrities To "Microinfluencers"
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

goimt 发表于 前天 05:09
感觉不错!
回复 支持 反对

使用道具 举报

竣风荣 发表于 前天 05:19
失而复得的东西。永远都是二手货。
回复 支持 反对

使用道具 举报

微信 发表于 前天 09:57
明明白白我的心,楼主赏我个沙发!
回复 支持 反对

使用道具 举报

告别薇安 发表于 前天 10:06
顶一下,收藏了!
回复 支持 反对

使用道具 举报

sichoucw792 发表于 前天 10:08
永远有多远?你小子就给我滚多远。
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表