From 4cebdef2e32f72c7af28843633e6737a4202b6e1 Mon Sep 17 00:00:00 2001 From: zhongsp Date: Sat, 1 Jun 2019 19:55:36 +0800 Subject: [PATCH] Avoid confusing with the built-in Map class. PR917 --- doc/handbook/Advanced Types.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/handbook/Advanced Types.md b/doc/handbook/Advanced Types.md index d34a3cf..288e90f 100644 --- a/doc/handbook/Advanced Types.md +++ b/doc/handbook/Advanced Types.md @@ -781,11 +781,11 @@ let unknown = getProperty(person, 'unknown'); // error, 'unknown' is not in 'nam 并且`T[string]`为索引签名的类型: ```ts -interface Map { +interface Dictionary { [key: string]: T; } -let keys: keyof Map; // string -let value: Map['foo']; // number +let keys: keyof Dictionary; // string +let value: Dictionary['foo']; // number ``` # 映射类型