mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 19:46:23 +00:00
19 lines
390 B
Markdown
19 lines
390 B
Markdown
---
|
|
id: e419189e-5af3-4291-8d51-d87d460c19e3
|
|
title: Uppercase
|
|
---
|
|
|
|
# Description
|
|
|
|
Transforms every string character to uppercase for [string literal
|
|
types](20201123101810-typescript_template_literal_string_type).
|
|
|
|
# Syntax
|
|
|
|
``` typescript
|
|
type EnthusiasticGreeting<T extends string> = `${Uppercase<T>}`
|
|
|
|
type HELLO = EnthusiasticGreeting<"hello">;
|
|
// same as
|
|
// type HELLO = "HELLO";
|
|
```
|