Option<A> provides a nullable value of type A. It's essentially the same
as A | undefined but with a lot of useful methods attached.
You can construct an Option using either the Some function to
wrap a present value of A, or the value None to signify a null
value. You can also convert a value that's A | undefined into an
Option by calling Option.from.
Option<A>
provides a nullable value of typeA
. It's essentially the same asA | undefined
but with a lot of useful methods attached.You can construct an Option using either the Some function to wrap a present value of
A
, or the value None to signify a null value. You can also convert a value that'sA | undefined
into an Option by calling Option.from.