Hacker News new | ask | show | jobs
by sedro 1399 days ago
And the purpose of "T extends string" is to carry the value of a string literal. For example, there's the string value "foo", but there's also a type "foo" which extends string and has only the one possible value.