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

`T | null` is equivalent to T. You can assign null to `T`>

It's like saying `string | "foo"` it is simply `string` due to subtyping.



... no? Unless you're referring to null as a bottom type, then that doesn't hold. Are you describing some property of a specific language?




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

Search: