forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJs_null_undefined.html
131 lines (120 loc) · 7.52 KB
/
Js_null_undefined.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="../../odoc_gen/tomorrow-night.css">
<link rel="stylesheet" href="../../odoc_gen/style.css" type="text/css">
<script src="../../odoc_gen//highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script><meta charset="utf-8">
<link rel="Start" href="index.html">
<link rel="previous" href="Js_null.html">
<link rel="next" href="Js_obj.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Block" rel="Chapter" href="Block.html">
<link title="Bs" rel="Chapter" href="Bs.html">
<link title="Bs_dyn" rel="Chapter" href="Bs_dyn.html">
<link title="Bs_dyn_lib" rel="Chapter" href="Bs_dyn_lib.html">
<link title="Bs_obj" rel="Chapter" href="Bs_obj.html">
<link title="Bs_string" rel="Chapter" href="Bs_string.html">
<link title="Caml_array" rel="Chapter" href="Caml_array.html">
<link title="Caml_backtrace" rel="Chapter" href="Caml_backtrace.html">
<link title="Caml_basic" rel="Chapter" href="Caml_basic.html">
<link title="Caml_builtin_exceptions" rel="Chapter" href="Caml_builtin_exceptions.html">
<link title="Caml_bytes" rel="Chapter" href="Caml_bytes.html">
<link title="Caml_exceptions" rel="Chapter" href="Caml_exceptions.html">
<link title="Caml_float" rel="Chapter" href="Caml_float.html">
<link title="Caml_format" rel="Chapter" href="Caml_format.html">
<link title="Caml_gc" rel="Chapter" href="Caml_gc.html">
<link title="Caml_hash" rel="Chapter" href="Caml_hash.html">
<link title="Caml_int32" rel="Chapter" href="Caml_int32.html">
<link title="Caml_int64" rel="Chapter" href="Caml_int64.html">
<link title="Caml_io" rel="Chapter" href="Caml_io.html">
<link title="Caml_lexer" rel="Chapter" href="Caml_lexer.html">
<link title="Caml_md5" rel="Chapter" href="Caml_md5.html">
<link title="Caml_module" rel="Chapter" href="Caml_module.html">
<link title="Caml_obj" rel="Chapter" href="Caml_obj.html">
<link title="Caml_oo" rel="Chapter" href="Caml_oo.html">
<link title="Caml_parser" rel="Chapter" href="Caml_parser.html">
<link title="Caml_primitive" rel="Chapter" href="Caml_primitive.html">
<link title="Caml_queue" rel="Chapter" href="Caml_queue.html">
<link title="Caml_string" rel="Chapter" href="Caml_string.html">
<link title="Caml_sys" rel="Chapter" href="Caml_sys.html">
<link title="Caml_utils" rel="Chapter" href="Caml_utils.html">
<link title="Caml_weak" rel="Chapter" href="Caml_weak.html">
<link title="Curry" rel="Chapter" href="Curry.html">
<link title="Js" rel="Chapter" href="Js.html">
<link title="Js_array" rel="Chapter" href="Js_array.html">
<link title="Js_boolean" rel="Chapter" href="Js_boolean.html">
<link title="Js_date" rel="Chapter" href="Js_date.html">
<link title="Js_dict" rel="Chapter" href="Js_dict.html">
<link title="Js_float" rel="Chapter" href="Js_float.html">
<link title="Js_global" rel="Chapter" href="Js_global.html">
<link title="Js_int" rel="Chapter" href="Js_int.html">
<link title="Js_int64" rel="Chapter" href="Js_int64.html">
<link title="Js_json" rel="Chapter" href="Js_json.html">
<link title="Js_math" rel="Chapter" href="Js_math.html">
<link title="Js_nativeint" rel="Chapter" href="Js_nativeint.html">
<link title="Js_null" rel="Chapter" href="Js_null.html">
<link title="Js_null_undefined" rel="Chapter" href="Js_null_undefined.html">
<link title="Js_obj" rel="Chapter" href="Js_obj.html">
<link title="Js_primitive" rel="Chapter" href="Js_primitive.html">
<link title="Js_re" rel="Chapter" href="Js_re.html">
<link title="Js_string" rel="Chapter" href="Js_string.html">
<link title="Js_types" rel="Chapter" href="Js_types.html">
<link title="Js_undefined" rel="Chapter" href="Js_undefined.html">
<link title="Js_unsafe" rel="Chapter" href="Js_unsafe.html">
<link title="Node" rel="Chapter" href="Node.html">
<link title="Node_buffer" rel="Chapter" href="Node_buffer.html">
<link title="Node_child_process" rel="Chapter" href="Node_child_process.html">
<link title="Node_fs" rel="Chapter" href="Node_fs.html">
<link title="Node_module" rel="Chapter" href="Node_module.html">
<link title="Node_path" rel="Chapter" href="Node_path.html">
<link title="Node_process" rel="Chapter" href="Node_process.html">
<link title="Typed_array" rel="Chapter" href="Typed_array.html"><title>Js_null_undefined</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Js_null.html" title="Js_null">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
<a class="post" href="Js_obj.html" title="Js_obj">Next</a>
</div>
<h1>Module <a href="type_Js_null_undefined.html">Js_null_undefined</a></h1>
<pre><span class="keyword">module</span> Js_null_undefined: <code class="code">sig</code> <a href="Js_null_undefined.html">..</a> <code class="code">end</code></pre><div class="info module top">
<div class="not-examples">
constructs a value of the Js.null_undefined type containing the given value<br>
</div>
<div class="examples">
</div>
</div>
<hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">'a</code> t</span> = <code class="type">'a <a href="Js.html#TYPEnull_undefined">Js.null_undefined</a></code> </pre>
<pre><span id="VALto_opt"><span class="keyword">val</span> to_opt</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a> -> 'a option</code></pre>
<pre><span id="VALreturn"><span class="keyword">val</span> return</span> : <code class="type">'a -> 'a <a href="Js_null_undefined.html#TYPEt">t</a></code></pre><div class="info ">
<div class="not-examples">
constructs a value of the Js.null_undefined type containing the given value<br>
</div>
<div class="examples">
</div>
</div>
<pre><span id="VALtest"><span class="keyword">val</span> test</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="not-examples">
returns `true` if given `null` or `undefined`, false otherwise<br>
</div>
<div class="examples">
</div>
</div>
<pre><span id="VALnull"><span class="keyword">val</span> null</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a></code></pre>
<pre><span id="VALundefined"><span class="keyword">val</span> undefined</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a></code></pre>
<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a></code></pre>
<pre><span id="VALbind"><span class="keyword">val</span> bind</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a> -><br> ([ `Arity_1 of 'a ], 'b) <a href="Js.html#TYPEfn">Js.fn</a> -> 'b <a href="Js_null_undefined.html#TYPEt">t</a></code></pre><div class="info ">
<div class="not-examples">
we did not add <code class="code">bind</code> yet, since the return value is
ambiguous and <code class="code">to_opt</code> depends on <a href="Js_primitive.html"><code class="code">Js_primitive</code></a><br>
</div>
<div class="examples">
</div>
</div>
<pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">'a <a href="Js_null_undefined.html#TYPEt">t</a> -> ([ `Arity_1 of 'a ], unit) <a href="Js.html#TYPEfn">Js.fn</a> -> unit</code></pre>
<pre><span id="VALfrom_opt"><span class="keyword">val</span> from_opt</span> : <code class="type">'a option -> 'a <a href="Js_null_undefined.html#TYPEt">t</a></code></pre></body></html>