From 8ebe2fcc8b56f17806747a56d3db1c862ae92e12 Mon Sep 17 00:00:00 2001 From: zhongsp Date: Sun, 20 Oct 2019 09:47:27 +0800 Subject: [PATCH] Fix Basic Types' table of contents and add object type usage note PR1123 --- doc/handbook/Basic Types.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/handbook/Basic Types.md b/doc/handbook/Basic Types.md index d0b932e..6a8a9cc 100644 --- a/doc/handbook/Basic Types.md +++ b/doc/handbook/Basic Types.md @@ -159,7 +159,6 @@ let prettySure: Object = 4; prettySure.toFixed(); // Error: Property 'toFixed' doesn't exist on type 'Object'. ``` -> Note: Avoid using `Object` in favor of the non-primitive `object` type as described in our [Do's and Don'ts](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#general-types) section. > 注意:应避免使用`Object`,而是使用非原始`object`类型,正如[Do's and Don'ts](./declaration-files/do-s-and-don-ts.html#general-types)里所讲的那样。 当你只知道一部分数据的类型时,`any`类型也是有用的。