Javascript还是打字稿? [英] Javascript or typescript?

查看:100
本文介绍了Javascript还是打字稿?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在工作,如果JavaScript已经有一段时间了,我已经告诉我,我应该尝试迁移到打字稿。



当前项目我正在工作是一个网络应用程序的事情,还有另一个前端开发人员。



我不是专业或反对打字风格编程,我瘦了它有非常好的使用取决于项目,所以这是我的问题:我们应该迁移到打字稿还是JS正在采取的当前路径绰绰有余坚持使用纯JavaScript?



我知道最后是你和我的项目。但我想就这个问题提出一些意见和经验。



我尝试过的事情:



阅读打字稿文件

检查ES6的新闻以及下一版本的TODO列表中的内容

I've been working if JavaScript for a while and it has been brought to me that I should try to "migrate" to typescript.

The current project I'm working is a web app thing and there is one other front end developer.

I'm not really pro or against typed style programming, I thinnk it has very good use depending on the project, so here is my question: Should we migrate to typescript or is the current path that JS is taking more than enough to stick with pure javascript?

I know that at the end it's up yo me and the project. But I would like some opinions and experience on the subject.

What I have tried:

Read the typescript documentation
Checked the news for ES6 and what is on the TODO list for the next version

推荐答案

由于 Typescript 是javascript的附加物,因此使用它对您的开发没有任何阻碍,您可以尽可能少地使用它。



在大型项目中,类型性有助于重构和更改事物。
Since Typescript is additive to javascript, using it is not obstructive to your development and you can use as little or as much as you like.

The typed nature helps a lot in refactoring and changing things in large projects.


Typescript只是Javascript的包装。 TS编译为Javascript。它的存在是为了更容易在Javascript中编写更加一致的代码。如果更容易编写Javascript并不适合您,请不要使用Typescript。
Typescript is just a wrapper around Javascript. TS compiles down to Javascript. It exists to make it easier to write far more consistent code in Javascript. If having an easier time writing Javascript doesn't appeal to you, don't use Typescript.


这篇关于Javascript还是打字稿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆