Y
Hacker News
new
|
ask
|
show
|
jobs
by
DidYaWipe
478 days ago
Yes, why do we have "const" at the beginning AND end?
1 comments
moogly
478 days ago
The `as const` at the end will ensure the type of `Foo` is not widened to a `string`.
link
DidYaWipe
476 days ago
I don't know JavaScript very well, so I'll take your word for it. Seems like a language flaw to me, though. How many times should you have to say something?
link