File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 24
24
25
25
(* * Contains functionality for dealing with values that can be both `null` and `undefined` *)
26
26
27
- type + 'a t = 'a Js .nullable
27
+ type + 'a t = 'a Js .nullable =
28
+ | Present of 'a
29
+ | Null [@ as null ]
30
+ | Undefined [@ as undefined ]
31
+ [@@ unboxed]
32
+
28
33
external toOption : 'a t -> 'a option = " #nullable_to_opt"
29
34
external to_opt : 'a t -> 'a option = " #nullable_to_opt"
30
35
external return : 'a -> 'a t = " %identity"
Original file line number Diff line number Diff line change 24
24
25
25
(* * Contains functionality for dealing with values that can be both `null` and `undefined` *)
26
26
27
- type +'a t = 'a Js .null_undefined
27
+ type +'a t = 'a Js .nullable =
28
+ | Present of 'a
29
+ | Null [@ as null ]
30
+ | Undefined [@ as undefined ]
31
+ [@@ unboxed]
28
32
(* * Local alias for `Js.null_undefined('a)`. *)
29
33
30
34
external return : 'a -> 'a t = " %identity"
You can’t perform that action at this time.
0 commit comments