Skip to content

Commit 8d73b03

Browse files
authored
Merge pull request #111 from LOUSANPANG/main
docs(class):correction words
2 parents 0666054 + 3a64f73 commit 8d73b03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/class.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ interface Swimmable {
471471
// ...
472472
}
473473

474-
interface SuperCar extends MotoVehicle,Flyable, Swimmable {
474+
interface SuperCar extends MotorVehicle,Flyable, Swimmable {
475475
// ...
476476
}
477477

@@ -570,7 +570,7 @@ const c1:Car = new Car();
570570
const c2:MotorVehicle = new Car();
571571
```
572572

573-
上面示例中,变量的类型可以写成类`Car`,也可以写成接口`MotorVehicle`。它们的区别是,如果类`Car`有接口`MotoVehicle`没有的属性和方法,那么只有变量`c1`可以调用这些属性和方法。
573+
上面示例中,变量的类型可以写成类`Car`,也可以写成接口`MotorVehicle`。它们的区别是,如果类`Car`有接口`MotorVehicle`没有的属性和方法,那么只有变量`c1`可以调用这些属性和方法。
574574

575575
作为类型使用时,类名只能表示实例的类型,不能表示类的自身类型。
576576

0 commit comments

Comments
 (0)