wiki/content/20201123103250-uppercase.md

21 lines
407 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-29 18:27:12 +00:00
date: 2020-11-23
2024-05-06 20:40:05 +00:00
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";
```