New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript : 类 vs 接口 #3375
Typescript : 类 vs 接口 #3375
Conversation
校对认领 |
@Starriers 好的呢 🍺 |
校对认领 |
@rpgmakervx 妥妥哒 🍻 |
@fanyijihua 原文无法打开? |
@rpgmakervx 正常浏览是打不开的 需要方法。但是不影响校对 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xueshuai @fanyijihua 校对完成
|
||
When you are defining a contract, you want to use an interface. That’s it, no arguing about that … but then, when to use a class ? | ||
John Papa has got his definition in this article : | ||
当你定义一个约定,你是想使用一个接口。一定是的,不可辩驳……但是,当你想使用一个类的时候呢?John Papa 已经在他的文章中指出了他的定义: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原文这是两句话,最后一段也是,我还是觉得尊重原文比较好,可以意译,但是排版,一定有作者自己的风格。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xueshuai @fanyijihua 校对完成
|
||
> Traditional JavaScript uses functions and prototype-based inheritance to build up reusable components, but this may feel a bit awkward to programmers more comfortable with an object-oriented approach, where classes inherit functionality and objects are built from these classes. | ||
> 传统的 Javascript 使用函数和基于原型的继承来构造可服用的组件,但是这会让那些对面向对象方法更舒服的程序员感到一些尴尬,在面向对象方法中,类继承了功能,而对象是通过累来构造的。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
而对象是通过 类 来构造的, 此处“类” 错打成了 累
@rpgmakervx @Starriers @fanyijihua 修改完成,请验收 |
@xueshuai 哈哈,要记得是艾特我的 |
@xueshuai 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。 掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件。 |
https://juejin.im/post/5aa79a106fb9a028db585eae 已经在掘金上发布啦
在 2018年3月12日,上午11:12,LeviDing <notifications@github.com<mailto:notifications@github.com>> 写道:
@xueshuai<https://github.com/xueshuai> 已经 merge 啦~ 快快麻溜发布到掘金<https://juejin.im/>然后给我发下链接,方便及时添加积分哟。
掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件<https://chrome.google.com/webstore/detail/minimalist-markdown-edito/pghodfjepegmciihfhdipmimghiakcjf?hl=zh-CN>。
专栏地址:https://zhuanlan.zhihu.com/juejinfanyi
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#3375 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AETEWFZ7Q0vl3k2K1O2BoU77p4kzb241ks5tdeeigaJpZM4SboJ4>.
|
译文翻译完成,resolve #3335