mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
19 lines
400 B
Markdown
19 lines
400 B
Markdown
---
|
|
id: 4bb57d5a-2f23-4155-b277-9d8446d65db9
|
|
title: Uncapitalize
|
|
---
|
|
|
|
# Description
|
|
|
|
Transforms the first string character to lowercase for [string literal
|
|
types](20201123101810-typescript_template_literal_string_type).
|
|
|
|
# Syntax
|
|
|
|
``` typescript
|
|
type UncapitalizedGreeting<T extends string> = `${Uncapitalize<T>}`
|
|
|
|
type HELLO = CapitalizedGreeting<"Hello">;
|
|
// same as
|
|
// type HELLO = "hello";
|
|
```
|