From 6bea4615cd2525dfd72052defaea3b417e4564e7 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 19 Aug 2023 08:10:21 +0800 Subject: [PATCH] docs(object): fixed #58 --- docs/object.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/object.md b/docs/object.md index cc37590..05d1165 100644 --- a/docs/object.md +++ b/docs/object.md @@ -504,11 +504,11 @@ function draw({ 只要对象 B 满足 对象 A 的结构特征,TypeScript 就认为对象 B 兼容对象 A 的类型,这称为“结构类型”原则(structural typing)。 ```typescript -const A = { +type A = { x: number; }; -const B = { +type B = { x: number; y: number; };