From 8fdb34ece09313c8c4419567466834a6e57522e6 Mon Sep 17 00:00:00 2001 From: Anoninz Date: Thu, 30 Sep 2021 11:15:00 +0800 Subject: [PATCH] Update callable.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 辅助阅读,原来的单行格式对新人其实不是很友好 --- docs/typings/callable.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/typings/callable.md b/docs/typings/callable.md index 7baf64a4a..116e990ad 100644 --- a/docs/typings/callable.md +++ b/docs/typings/callable.md @@ -66,7 +66,8 @@ let overloaded: { 为了使指定可调用的类型签名更容易,TypeScript 也允许你使用简单的箭头函数类型注解。例如,在一个以 number 类型为参数,以 string 类型为返回值的函数中,你可以这么写: ```ts -const simple: (foo: number) => string = foo => foo.toString(); +const simple: (foo: number) => string + = foo => foo.toString(); ``` ::: tip