Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
NathanaelRea
4 months ago
|
parent
|
context
|
favorite
| on:
Unconventional Ways to Cast in TypeScript
You could also do
const arr = ["foo" as const]
Latty
4 months ago
[–]
That's also different: "foo"[] as opposed to ["foo"] or readonly ["foo"].
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: