|
|
|
|
|
by evomassiny
1205 days ago
|
|
the type `null | true | false` is different from `true | false`, a type checker
can assert that you handle the `null` case before using a function that wants a boolean.
This is how rust handles it (with the Option<T> type). |
|
Assuming that `true | false` is equivalent to something like `enum { true, false }`.