Skip to content

Commit

Permalink
Update classes-emit.md
Browse files Browse the repository at this point in the history
  • Loading branch information
waddlaw committed Mar 26, 2019
1 parent 753e339 commit d77705a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/classes-emit.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var __extends = this.__extends || function (d, b) {
```
ここで `d`は派生クラスを指し、`b`はベースクラスを指します。この関数は2つのことを行います:

1. 親クラスの静的メンバを子クラスにコピーする:`(b.hasOwnProperty(p))d [p] = b [p];`
1. 親クラスの静的メンバを子クラスにコピーする:`for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];`
1. 子クラス関数のプロトタイプを準備し、任意に親の`proto`のメンバを検索できるようにする。つまり、`d.prototype.__ proto__ = b.prototype`を実現する

1を理解するのに苦労する人はほとんどいませんが、2については多くの人が理解に苦労します。なので順番に説明します。
Expand Down

0 comments on commit d77705a

Please sign in to comment.