Update docs/types-library-optional.md

This commit is contained in:
ariel 2025-04-25 15:12:41 -04:00 committed by GitHub
parent 97e3a0d22f
commit 87fbe13eec
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ This RFC proposes adding a new method to the `types` library in type functions,
## Motivation ## Motivation
Currently its annoying to have to always type `types.unionof(meow, types.singleton(nil))` to make a optional type, this leads to having the following appear in codebases that make use of optional types a lot in type functions: Optional types occur very commonly, and it is annoying to have to always type `types.unionof(meow, types.singleton(nil))` to make a optional type, this leads to having the following appear in codebases that make use of optional types a lot in type functions:
```luau ```luau
type function optional(type) type function optional(type)