types.optional revision (#120)

This commit is contained in:
ariel 2025-04-25 12:18:07 -07:00 committed by GitHub
parent a4b51fdd5c
commit 81565c6e6a
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -16,4 +16,4 @@ end
## Design
As a solution, a new method to the `types` library should be added called `optional`. This new method will act the same as `types.unionof(type, types.singleton(nil))`.
As a solution, a new method to the `types` library should be added called `optional`. When called on a union, this will add `nil` to the components. Otherwise, this new method will act the same as `types.unionof(type, types.singleton(nil))`.