Hacker News new | ask | show | jobs
by epolanski 769 days ago
`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.

1 comments

... 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?