Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
修复类的静态属性中实例代码的错误
class MyClass {
  static myStaticProp = 42;

  constructor() {
    console.log(MyClass.myProp); // 42
  }
}
修改为:
class MyClass {
  static myStaticProp = 42;

  constructor() {
    console.log(MyClass.myStaticProp); // 42
  }
}
  • Loading branch information
MrErHu authored Feb 23, 2017
commit 9f4ca941521aa318c6c07ebea05f5791a6e3c295
2 changes: 1 addition & 1 deletion docs/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ class MyClass {
static myStaticProp = 42;

constructor() {
console.log(MyClass.myProp); // 42
console.log(MyClass.myStaticProp); // 42
}
}
```
Expand Down