<! doctype html>
<html>
<head>
                 <link rel="stylesheet" href="../api_static/tomorrow-night.css">
                 <link rel="stylesheet" href="../api_static/style.css" type="text/css">
                 <script src="../api_static//highlight.pack.js"></script>
                 <script src="../api_static//script.js"></script>
                 <script>hljs.initHighlightingOnLoad();</script> 
                 <meta charset="utf8">
                 <link rel="previous" href="Js. Re.html"><link rel="next" href="Js. Date.html">
                 <title> Js. Promise </title></head> 
               <body>
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
<li><a href="Belt_Array.html">Belt_Array</a></li>
<li><a href="Belt_Debug.html">Belt_Debug</a></li>
<li><a href="Belt_HashMap.html">Belt_HashMap</a></li>
<li><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></li>
<li><a href="Belt_HashMapString.html">Belt_HashMapString</a></li>
<li><a href="Belt_HashSet.html">Belt_HashSet</a></li>
<li><a href="Belt_HashSetInt.html">Belt_HashSetInt</a></li>
<li><a href="Belt_HashSetString.html">Belt_HashSetString</a></li>
<li><a href="Belt_Id.html">Belt_Id</a></li>
<li><a href="Belt_List.html">Belt_List</a></li>
<li><a href="Belt_Map.html">Belt_Map</a></li>
<li><a href="Belt_MapDict.html">Belt_MapDict</a></li>
<li><a href="Belt_MapInt.html">Belt_MapInt</a></li>
<li><a href="Belt_MapString.html">Belt_MapString</a></li>
<li><a href="Belt_MutableMap.html">Belt_MutableMap</a></li>
<li><a href="Belt_MutableMapInt.html">Belt_MutableMapInt</a></li>
<li><a href="Belt_MutableMapString.html">Belt_MutableMapString</a></li>
<li><a href="Belt_MutableQueue.html">Belt_MutableQueue</a></li>
<li><a href="Belt_MutableSet.html">Belt_MutableSet</a></li>
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
<li><a href="Belt_Option.html">Belt_Option</a></li>
<li><a href="Belt_Range.html">Belt_Range</a></li>
<li><a href="Belt_Result.html">Belt_Result</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
<li><a href="Belt_SetInt.html">Belt_SetInt</a></li>
<li><a href="Belt_SetString.html">Belt_SetString</a></li>
<li><a href="Belt_SortArray.html">Belt_SortArray</a></li>
<li><a href="Belt_SortArrayInt.html">Belt_SortArrayInt</a></li>
<li><a href="Belt_SortArrayString.html">Belt_SortArrayString</a></li>
<li><a href="Belt_internalAVLset.html">Belt_internalAVLset</a></li>
<li><a href="Belt_internalAVLtree.html">Belt_internalAVLtree</a></li>
<li><a href="Belt_internalBuckets.html">Belt_internalBuckets</a></li>
<li><a href="Belt_internalBucketsType.html">Belt_internalBucketsType</a></li>
<li><a href="Belt_internalMapInt.html">Belt_internalMapInt</a></li>
<li><a href="Belt_internalMapString.html">Belt_internalMapString</a></li>
<li><a href="Belt_internalMutableAVLMap.html">Belt_internalMutableAVLMap</a></li>
<li><a href="Belt_internalSetBuckets.html">Belt_internalSetBuckets</a></li>
<li><a href="Belt_internalSetInt.html">Belt_internalSetInt</a></li>
<li><a href="Belt_internalSetString.html">Belt_internalSetString</a></li>
<li><a href="Dom.html">Dom</a></li>
<li><a href="Dom_storage.html">Dom_storage</a></li>
<li><a href="Js.html">Js</a></li>
<li><a href="Js_array.html">Js_array</a></li>
<li><a href="Js_boolean.html">Js_boolean</a></li>
<li><a href="Js_cast.html">Js_cast</a></li>
<li><a href="Js_console.html">Js_console</a></li>
<li><a href="Js_date.html">Js_date</a></li>
<li><a href="Js_dict.html">Js_dict</a></li>
<li><a href="Js_exn.html">Js_exn</a></li>
<li><a href="Js_float.html">Js_float</a></li>
<li><a href="Js_global.html">Js_global</a></li>
<li><a href="Js_int.html">Js_int</a></li>
<li><a href="Js_int64.html">Js_int64</a></li>
<li><a href="Js_internal.html">Js_internal</a></li>
<li><a href="Js_json.html">Js_json</a></li>
<li><a href="Js_list.html">Js_list</a></li>
<li><a href="Js_mapperRt.html">Js_mapperRt</a></li>
<li><a href="Js_math.html">Js_math</a></li>
<li><a href="Js_nativeint.html">Js_nativeint</a></li>
<li><a href="Js_null.html">Js_null</a></li>
<li><a href="Js_null_undefined.html">Js_null_undefined</a></li>
<li><a href="Js_obj.html">Js_obj</a></li>
<li><a href="Js_option.html">Js_option</a></li>
<li><a href="Js_primitive.html">Js_primitive</a></li>
<li><a href="Js_promise.html">Js_promise</a></li>
<li><a href="Js_re.html">Js_re</a></li>
<li><a href="Js_result.html">Js_result</a></li>
<li><a href="Js_string.html">Js_string</a></li>
<li><a href="Js_typed_array.html">Js_typed_array</a></li>
<li><a href="Js_types.html">Js_types</a></li>
<li><a href="Js_undefined.html">Js_undefined</a></li>
<li><a href="Js_unsafe.html">Js_unsafe</a></li>
<li><a href="Js_vector.html">Js_vector</a></li>
<li><a href="Node.html">Node</a></li>
<li><a href="Node_buffer.html">Node_buffer</a></li>
<li><a href="Node_child_process.html">Node_child_process</a></li>
<li><a href="Node_fs.html">Node_fs</a></li>
<li><a href="Node_module.html">Node_module</a></li>
<li><a href="Node_path.html">Node_path</a></li>
<li><a href="Node_process.html">Node_process</a></li></ul></nav>
<div class="navbar"><a class="pre" href="Js. Re.html" title="Js. Re">Previous</a>
&nbsp;<a class="up" href="Js.html" title="Js">Up</a>
&nbsp;<a class="post" href="Js. Date.html" title="Js. Date">Next</a>
</div>
<h1>Module <a href="type_Js. Promise.html">Js. Promise</a></h1>

<pre><span class="keyword">module</span> Promise: <code class="type"><a href="Js_promise.html">Js_promise</a></code></pre><div class="info module top">
                    <div class="not-examples">
                    Provide bindings to JS promise<br>
 
                    </div>
                    
                    </div>

                  <hr width="100%">
<div class="type-declaration">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">+'a</code> t</span> </pre>
</div>

<div class="type-declaration">
<pre><span id="TYPEerror"><span class="keyword">type</span> <code class="type"></code>error</span> </pre>
</div>


<pre><span id="VALmake"><span class="keyword">val</span> make</span> : <code class="type">(resolve:('a -> unit [@bs]) -> reject:(exn -> unit [@bs]) -> unit) -><br>       'a <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALresolve"><span class="keyword">val</span> resolve</span> : <code class="type">'a -> 'a <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALreject"><span class="keyword">val</span> reject</span> : <code class="type">exn -> 'a <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALall"><span class="keyword">val</span> all</span> : <code class="type">'a <a href="Js_promise.html#TYPEt">t</a> array -> 'a array <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALall2"><span class="keyword">val</span> all2</span> : <code class="type">'a0 <a href="Js_promise.html#TYPEt">t</a> * 'a1 <a href="Js_promise.html#TYPEt">t</a> -> ('a0 * 'a1) <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALall3"><span class="keyword">val</span> all3</span> : <code class="type">'a0 <a href="Js_promise.html#TYPEt">t</a> * 'a1 <a href="Js_promise.html#TYPEt">t</a> * 'a2 <a href="Js_promise.html#TYPEt">t</a> -><br>       ('a0 * 'a1 * 'a2) <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALall4"><span class="keyword">val</span> all4</span> : <code class="type">'a0 <a href="Js_promise.html#TYPEt">t</a> * 'a1 <a href="Js_promise.html#TYPEt">t</a> * 'a2 <a href="Js_promise.html#TYPEt">t</a> * 'a3 <a href="Js_promise.html#TYPEt">t</a> -><br>       ('a0 * 'a1 * 'a2 * 'a3) <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALall5"><span class="keyword">val</span> all5</span> : <code class="type">'a0 <a href="Js_promise.html#TYPEt">t</a> * 'a1 <a href="Js_promise.html#TYPEt">t</a> * 'a2 <a href="Js_promise.html#TYPEt">t</a> * 'a3 <a href="Js_promise.html#TYPEt">t</a> *<br>       'a4 <a href="Js_promise.html#TYPEt">t</a> -> ('a0 * 'a1 * 'a2 * 'a3 * 'a4) <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALall6"><span class="keyword">val</span> all6</span> : <code class="type">'a0 <a href="Js_promise.html#TYPEt">t</a> * 'a1 <a href="Js_promise.html#TYPEt">t</a> * 'a2 <a href="Js_promise.html#TYPEt">t</a> * 'a3 <a href="Js_promise.html#TYPEt">t</a> *<br>       'a4 <a href="Js_promise.html#TYPEt">t</a> * 'a5 <a href="Js_promise.html#TYPEt">t</a> -><br>       ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5) <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALrace"><span class="keyword">val</span> race</span> : <code class="type">'a <a href="Js_promise.html#TYPEt">t</a> array -> 'a <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALthen_"><span class="keyword">val</span> then_</span> : <code class="type">('a -> 'b <a href="Js_promise.html#TYPEt">t</a>) -> 'a <a href="Js_promise.html#TYPEt">t</a> -> 'b <a href="Js_promise.html#TYPEt">t</a></code></pre>
<pre><span id="VALcatch"><span class="keyword">val</span> catch</span> : <code class="type">(<a href="Js_promise.html#TYPEerror">error</a> -> 'a <a href="Js_promise.html#TYPEt">t</a>) -> 'a <a href="Js_promise.html#TYPEt">t</a> -> 'a <a href="Js_promise.html#TYPEt">t</a></code></pre></body></html>