Connect, collaborate, and grow with a community of TypeScript developers
Remove extra space literal types prompt.md (#1374)
Germano Lira6db18bdf2328
diff --git a/challenges/literal-types/prompt.md b/challenges/literal-types/prompt.mdindex 38e50505..3c8f4ba3 100644--- a/challenges/literal-types/prompt.md+++ b/challenges/literal-types/prompt.md@@ -62,7 +62,7 @@ The _return type_ for this function is _also_ a literal type union. Notice thatIf you're thinking to yourself:-> Why are type literals even necessary? Lots of languages don't have anything like this and they seem to get along just fine with primitive types like `string` and `number` and `boolean`.+> Why are type literals even necessary? Lots of languages don't have anything like this and they seem to get along just fine with primitive types like `string` and `number` and `boolean`.The TLDR; is: once you pair type unions with literals, you can start _discriminating_ inputs based on one particular literal instance of a type versus another, TypeScript suddenly becomes capable of doing some pretty amazing static analysis on your code that you could never do if all you had were primitive types. If that's unpalatable to you, there's always COBOL. Try that out instead maybe?