Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`as const` is a special annotation that lets the TypeScript compiler infers the more specific type `["foo"]` instead of `string[]`.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: