mirror of
https://github.com/apple/pkl.git
synced 2026-04-24 09:18:35 +02:00
[docs] Add mention of "optional" to nullably types section (#613)
This commit is contained in:
@@ -3721,6 +3721,7 @@ bird2: Bird? = null // <2>
|
|||||||
The only class types that admit `null` values despite not ending in `?` are `Any` and `Null`.
|
The only class types that admit `null` values despite not ending in `?` are `Any` and `Null`.
|
||||||
(`Null` is not very useful as a type because it _only_ admits `null` values.)
|
(`Null` is not very useful as a type because it _only_ admits `null` values.)
|
||||||
`Any?` and `Null?` are equivalent to `Any` and `Null`, respectively.
|
`Any?` and `Null?` are equivalent to `Any` and `Null`, respectively.
|
||||||
|
In some languages, nullable types are also known as _optional types_.
|
||||||
|
|
||||||
[[generic-types]]
|
[[generic-types]]
|
||||||
==== Generic Types
|
==== Generic Types
|
||||||
|
|||||||
Reference in New Issue
Block a user