Skip to content

Commit 6bea461

Browse files
committed
docs(object): fixed wangdoc#58
1 parent 0f7f99d commit 6bea461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/object.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,11 @@ function draw({
504504
只要对象 B 满足 对象 A 的结构特征,TypeScript 就认为对象 B 兼容对象 A 的类型,这称为“结构类型”原则(structural typing)。
505505

506506
```typescript
507-
const A = {
507+
type A = {
508508
x: number;
509509
};
510510

511-
const B = {
511+
type B = {
512512
x: number;
513513
y: number;
514514
};

0 commit comments

Comments
 (0)