How to add a string type annotation to a function parameter in TypeScript?
Originally Published Here ๐!
String type annotations can be added to function parameters by declaring the function and then adding the name of the parameter followed by the : symbol (colon) and then the type string after the symbol.
TL;DR
// add str...
melvingeorge-me.hashnode.dev2 min read