Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Smaug123
· 4y ago · 0 comments
It's just "T extends string", with a default value of `string` if you don't supply T.
Comments
[–]
sedro
4y 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.