How to convert the first letter of a string literal type into an uppercase format or capitalize in TypeScript?
Originally Published Here ๐!
To convert the first letter of string literal type into an uppercase format or capitalize, you can use the built-in Capitalize type that comes with TypeScript.
TL;DR
// string literal type
type Greeting = "hello";
// co...
melvingeorge-me.hashnode.dev1 min read