You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the type definition of O.Option<A> = A|null|undefined, where A is regarded as Some<A>, and null | undefined as None, I thought that literal null values should behave the same as undefined literal values.
I've just written some examples from ts-belt's live editor.
nullish values
O.match
O.isNone
null
undefined
for example, the O.match is described as follows, where the null value could passed into someFn.
and O.isNone seems generated from the gentype utility from the rescript-compiler.
I found that O.fromNullable for every null occurring situation, but it's very cumbersome, and so unintuitive because of O.Option's type mismatches with these behaviors.
The text was updated successfully, but these errors were encountered:
From the type definition of
O.Option<A> = A|null|undefined
, whereA
is regarded asSome<A>
, andnull | undefined
asNone
, I thought that literal null values should behave the same as undefined literal values.I've just written some examples from ts-belt's live editor.
null
undefined
for example, the O.match is described as follows, where the
null
value could passed into someFn.and O.isNone seems generated from the gentype utility from the rescript-compiler.
I found that O.fromNullable for every null occurring situation, but it's very cumbersome, and so unintuitive because of O.Option's type mismatches with these behaviors.
The text was updated successfully, but these errors were encountered: