mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
types.optional revision
This commit is contained in:
parent
a4b51fdd5c
commit
6ae026fc69
1 changed files with 1 additions and 1 deletions
|
@ -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))`.
|
||||
|
|
Loading…
Add table
Reference in a new issue