mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 19:46:23 +00:00
390 B
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";