mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
407 B
407 B
date | id | title |
---|---|---|
2020-11-23 | 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";