File tree 1 file changed +19
-5
lines changed
1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,16 @@ For example:
120
120
[source,ocaml]
121
121
.Js module
122
122
-----
123
- val Js.to_bool: Js.boolean -> bool
123
+ type boolean
124
+ val to_bool: boolean -> bool
124
125
-----
125
126
126
- | `'a Js.Null.t` a| either `'a` or `null`. `Js.Null.empty` represents `null` too.
127
+ .Js.Boolean module
128
+ -----
129
+ val to_js_boolean: bool -> Js.boolean
130
+ -----
131
+
132
+ | `'a Js.Null.t` a| Either `'a` or `null`. `Js.Null.empty` represents `null` too.
127
133
128
134
[source,ocaml]
129
135
.Js.Null module
@@ -134,11 +140,19 @@ val return : 'a -> 'a t
134
140
val test : 'a t -> bool
135
141
--------------
136
142
137
- | `'a Js.Undefined.t` a| either `'a` or `undefined`.
138
- Same operations as `'a Js.Null.t`.
143
+ | `'a Js.Undefined.t` a| Either `'a` or `undefined`.
144
+ Same operations as `'a Js.Null.t`. `Js.Undefined.empty` represents `undefined` too.
139
145
140
- |`'a Js.Null_undefined.t` a| either `'a`, `null` or `undef `.
146
+ |`'a Js.Null_undefined.t` a| Either `'a`, `null` or `undefined `.
141
147
Same operations as `'a Js.Null.t`.
148
+
149
+ `Js.Null_undefined.undefined` represents `undefined`,
150
+ `Js.Null_undefined.null` represents `null`.
151
+
152
+ This module's null tests check for both `null` and `undefined`; if you know the
153
+ value's only ever going to be `null` and not undefined, use `Js.Null` instead.
154
+ Likewise for `Js.Undefined`.
155
+
142
156
|==============
143
157
144
158
NOTE: `Js.to_opt` is optimized when the `option` is not escaped
You can’t perform that action at this time.
0 commit comments