From f0c484d8499c1fcafaa19eda2fc152d1049a461a Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Sat, 23 Sep 2023 09:28:16 +0000 Subject: [PATCH] doc: update typescript.md (#439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正类型技巧内Capitalize的推导结果 106d7aa6025c73f05df1b6fdbf98519793c710f8 --- CONTRIBUTORS.svg | 4 +++- docs/typescript.html | 2 +- index.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.svg b/CONTRIBUTORS.svg index 076d39f9..5e493af6 100644 --- a/CONTRIBUTORS.svg +++ b/CONTRIBUTORS.svg @@ -3,7 +3,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="740" - height="416" + height="468" > @@ -230,5 +230,7 @@ + + \ No newline at end of file diff --git a/docs/typescript.html b/docs/typescript.html index dfaaf926..bee37bcb 100644 --- a/docs/typescript.html +++ b/docs/typescript.html @@ -1042,7 +1042,7 @@
type Capitalize<T extends string> = T extends `${infer U}${infer V}`
   ? `${Uppercase<U>}${V}`
   : T
-type capitalized = Capitalize<"hello world"> // Hello World
+type capitalized = Capitalize<"hello world"> // Hello world
 

也可以在 infer 中使用条件约束(extends

type SomeBigInt = "100" extends `${infer U extends bigint}` ? U : never;
diff --git a/index.html b/index.html
index fa12f8c3..1fcd8e46 100644
--- a/index.html
+++ b/index.html
@@ -1360,7 +1360,7 @@
 
 

如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 gh-pages 分支代码到你的静态服务就可以了,还可以使用 docker 快捷部署 web 版。

-
© 2022 Kenny Wang. Updated on 2023/09/22 08:59:13
+
© 2022 Kenny Wang. Updated on 2023/09/23 17:27:05