mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
411 B
411 B
date | id | title |
---|---|---|
2020-11-23 | 51e8b29a-b87a-4022-8287-36b8090fe83b | Lowercase |
Description
Transforms every string character to lowercase for string literal types.
Syntax
type UnenthusiasticGreeting<T extends string> = `${Lowercase<T>}`
type HELLO = UnenthusiasticGreeting<"HELLO">;
// same as
// type HELLO = "hello";