diff --git a/docs/typescript.md b/docs/typescript.md index 9e9b497..94cbc52 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -1360,7 +1360,7 @@ const Row = (props: RowProps) => { type Capitalize = T extends `${infer U}${infer V}` ? `${Uppercase}${V}` : T -type capitalized = Capitalize<"hello world"> // Hello World +type capitalized = Capitalize<"hello world"> // Hello world ``` 也可以在 infer 中使用条件约束(`extends`)