docs: fix typo in interface.md

inteface -> interface
This commit is contained in:
Ikko Eltociear Ashimine
2023-08-12 02:34:38 +09:00
committed by GitHub
parent fbb32136cb
commit e4a8092ecd

View File

@@ -322,7 +322,7 @@ interface CountryWithPop extends Country {
### interface 继承 class
inteface 还可以继承 class即继承该类的所有成员。关于 class 的详细解释,参见下一章。
interface 还可以继承 class即继承该类的所有成员。关于 class 的详细解释,参见下一章。
```typescript
class A {
@@ -613,7 +613,7 @@ const obj:A = {
上面示例中,`interface`把类型`A`的两个定义合并在一起。
这表明inteface 是开放的可以添加属性type 是封闭的,不能添加属性,只能定义新的 type。
这表明interface 是开放的可以添加属性type 是封闭的,不能添加属性,只能定义新的 type。
4`interface`不能包含属性映射mapping`type`可以,详见《映射》一章。