Skip to content

Commit 9f4ca94

Browse files
authored
修复类的静态属性中实例代码的错误
class MyClass { static myStaticProp = 42; constructor() { console.log(MyClass.myProp); // 42 } } 修改为: class MyClass { static myStaticProp = 42; constructor() { console.log(MyClass.myStaticProp); // 42 } }
1 parent 002618a commit 9f4ca94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ class MyClass {
13441344
static myStaticProp = 42;
13451345

13461346
constructor() {
1347-
console.log(MyClass.myProp); // 42
1347+
console.log(MyClass.myStaticProp); // 42
13481348
}
13491349
}
13501350
```

0 commit comments

Comments
 (0)