From d18ed8c4c3e43ce85bf36c3686f3c5fa66a35c29 Mon Sep 17 00:00:00 2001 From: zhongsp Date: Tue, 17 Sep 2019 19:51:11 +0800 Subject: [PATCH] Fix error message when passing an object literal PR1010 --- doc/handbook/Interfaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/handbook/Interfaces.md b/doc/handbook/Interfaces.md index bc09a9c..f8f3207 100644 --- a/doc/handbook/Interfaces.md +++ b/doc/handbook/Interfaces.md @@ -171,7 +171,7 @@ let mySquare = createSquare({ colour: "red", width: 100 }); 如果一个对象字面量存在任何“目标类型”不包含的属性时,你会得到一个错误。 ```ts -// error: 'colour' not expected in type 'SquareConfig' +// error: Object literal may only specify known properties, but 'colour' does not exist in type 'SquareConfig'. Did you mean to write 'color'? let mySquare = createSquare({ colour: "red", width: 100 }); ```