wiki/content/20201123103250-uppercase.md

390 B

id title
e419189e-5af3-4291-8d51-d87d460c19e3 Uppercase

Description

Transforms every string character to uppercase for string literal types.

Syntax

type EnthusiasticGreeting<T extends string> = `${Uppercase<T>}`

type HELLO = EnthusiasticGreeting<"hello">;
// same as
//   type HELLO = "HELLO";