UNPKG

redux-actions-promise-wrapper

Version:

Type safe wrapper for redux actions (compatible with redux-saga)

767 lines 55.3 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>&quot;index&quot; | my-project-name</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">my-project-name</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="_index_.html">&quot;index&quot;</a> </li> </ul> <h1>External module &quot;index&quot;</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-not-exported"> <h3>Interfaces</h3> <ul class="tsd-index-list"> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_index_.ia.html" class="tsd-kind-icon">Ia</a></li> <li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_index_.iput.html" class="tsd-kind-icon">Iput</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Type aliases</h3> <ul class="tsd-index-list"> <li class="tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter"><a href="_index_.html#actionunion" class="tsd-kind-icon">Action<wbr>Union</a></li> <li class="tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter"><a href="_index_.html#extractactions" class="tsd-kind-icon">Extract<wbr>Actions</a></li> <li class="tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"><a href="_index_.html#actionhandler" class="tsd-kind-icon">action<wbr>Handler</a></li> <li class="tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"><a href="_index_.html#handleaction" class="tsd-kind-icon">handle<wbr>Action</a></li> <li class="tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"><a href="_index_.html#invokesignature" class="tsd-kind-icon">invoke<wbr>Signature</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Functions</h3> <ul class="tsd-index-list"> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"><a href="_index_.html#actioncreator" class="tsd-kind-icon">action<wbr>Creator</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"><a href="_index_.html#createaction" class="tsd-kind-icon">create<wbr>Action</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"><a href="_index_.html#promisehandler" class="tsd-kind-icon">promise<wbr>Handler</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_index_.html#put" class="tsd-kind-icon">put</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"><a href="_index_.html#reg" class="tsd-kind-icon">reg</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Type aliases</h2> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter"> <a name="actionunion" class="tsd-anchor"></a> <h3>Action<wbr>Union</h3> <div class="tsd-signature tsd-kind-icon">Action<wbr>Union<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">{ [Key in keyof A]: A[Key] extends (...args: any[]) &#x3D;&gt; any ? ReturnType&lt;A[Key]&gt; extends IterableIterator&lt;any&gt; ? never : ReturnType&lt;A[Key]&gt; : never; }[keyof A]</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L55">index.ts:55</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter"> <a name="extractactions" class="tsd-anchor"></a> <h3>Extract<wbr>Actions</h3> <div class="tsd-signature tsd-kind-icon">Extract<wbr>Actions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">{ [Key in keyof Base]: { [Key in keyof Base[Key]]: Base[Key][Key] extends (...args: any[]) &#x3D;&gt; any ? ReturnType&lt;Base[Key][Key]&gt; extends IterableIterator&lt;any&gt; ? never : ReturnType&lt;Base[Key][Key]&gt; : never; }[keyof Base[Key]]; }[keyof Base]</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L52">index.ts:52</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Extract Actions to be used in reducer</p> </div> <dl class="tsd-comment-tags"> <dt>example</dt> <dd><p>type Actions = ExtractActions&lt;loginAction | logoutAction&gt;</p> </dd> </dl> </div> </section> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a name="actionhandler" class="tsd-anchor"></a> <h3>action<wbr>Handler</h3> <div class="tsd-signature tsd-kind-icon">action<wbr>Handler<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">actionHandler&lt;T, P, H, R&gt;</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L91">index.ts:91</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a name="handleaction" class="tsd-anchor"></a> <h3>handle<wbr>Action</h3> <div class="tsd-signature tsd-kind-icon">handle<wbr>Action<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">P extends undefined ? () &#x3D;&gt; IterableIterator&lt;R&gt; : (args: P) &#x3D;&gt; IterableIterator&lt;R&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">H</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L81">index.ts:81</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a name="invokesignature" class="tsd-anchor"></a> <h3>invoke<wbr>Signature</h3> <div class="tsd-signature tsd-kind-icon">invoke<wbr>Signature<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">invokeSignature&lt;T, P, R&gt;</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L72">index.ts:72</a></li> </ul> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Functions</h2> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a name="actioncreator" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagConst">Const</span> action<wbr>Creator</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon">action<wbr>Creator&lt;T, P, R&gt;<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">(Anonymous function)</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L29">index.ts:29</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Action Creator</p> </div> </div> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>T</h4> </li> <li> <h4>P</h4> </li> <li> <h4>R</h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">T</span></h5> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Action Type</p> </div> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">(Anonymous function)</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"> <a name="createaction" class="tsd-anchor"></a> <h3>create<wbr>Action</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"> <li class="tsd-signature tsd-kind-icon">create<wbr>Action&lt;T&gt;<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></li> <li class="tsd-signature tsd-kind-icon">create<wbr>Action&lt;T, ST&gt;<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, successType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ST</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></li> <li class="tsd-signature tsd-kind-icon">create<wbr>Action&lt;T, ST, FT&gt;<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, successType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ST</span>, failureType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FT</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L95">index.ts:95</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>T<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">T</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">function</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-has-type-parameter tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></li> <li class="tsd-signature tsd-kind-icon">&lt;P, H, R&gt;<span class="tsd-signature-symbol">(</span>handleAction<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">H</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> &amp; </span><a href="_index_.html#invokesignature" class="tsd-signature-type">invokeSignature</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> <li class="tsd-parameter"> <h5>TRIGGER<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></h5> </li> <li class="tsd-parameter"> <h5>trigger<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> </ul> </li> <li class="tsd-description"> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>P</h4> </li> <li> <h4>H</h4> </li> <li> <h4>R</h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> handleAction: <a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">H</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol"> &amp; </span> <a href="_index_.html#invokesignature" class="tsd-signature-type">invokeSignature</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span> </h4> </li> </ul> </li> </ul> </li> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L111">index.ts:111</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>T<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> <li> <h4>ST<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">T</span></h5> </li> <li> <h5>successType: <span class="tsd-signature-type">ST</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">function</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-has-type-parameter tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></li> <li class="tsd-signature tsd-kind-icon">&lt;P, SP, H, R, SH, SR&gt;<span class="tsd-signature-symbol">(</span>handleAction<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">H</span><span class="tsd-signature-symbol">&gt;</span>, handleSuccess<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">SP</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SR</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SH</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> &amp; </span><a href="_index_.html#invokesignature" class="tsd-signature-type">invokeSignature</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> <li class="tsd-parameter"> <h5>SUCCESS<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ST</span></h5> </li> <li class="tsd-parameter"> <h5>TRIGGER<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></h5> </li> <li class="tsd-parameter"> <h5>success<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ST</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ST</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> <li class="tsd-parameter"> <h5>trigger<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> </ul> </li> <li class="tsd-description"> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>P</h4> </li> <li> <h4>SP</h4> </li> <li> <h4>H</h4> </li> <li> <h4>R</h4> </li> <li> <h4>SH</h4> </li> <li> <h4>SR</h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> handleAction: <a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">H</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> handleSuccess: <a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">SP</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SR</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SH</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol"> &amp; </span> <a href="_index_.html#invokesignature" class="tsd-signature-type">invokeSignature</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span> </h4> </li> </ul> </li> </ul> </li> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L141">index.ts:141</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>T<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> <li> <h4>ST<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> <li> <h4>FT<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">T</span></h5> </li> <li> <h5>successType: <span class="tsd-signature-type">ST</span></h5> </li> <li> <h5>failureType: <span class="tsd-signature-type">FT</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">function</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-has-type-parameter tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></li> <li class="tsd-signature tsd-kind-icon">&lt;P, SP, FP, H, R, SH, SR, FH, FR&gt;<span class="tsd-signature-symbol">(</span>handleAction<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">H</span><span class="tsd-signature-symbol">&gt;</span>, handleSuccess<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">SP</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SR</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SH</span><span class="tsd-signature-symbol">&gt;</span>, handleFailure<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">FP</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">FR</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">FH</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> &amp; </span><a href="_index_.html#invokesignature" class="tsd-signature-type">invokeSignature</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> <li class="tsd-parameter"> <h5>FAILURE<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FT</span></h5> </li> <li class="tsd-parameter"> <h5>SUCCESS<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ST</span></h5> </li> <li class="tsd-parameter"> <h5>TRIGGER<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></h5> </li> <li class="tsd-parameter"> <h5>failure<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">FT</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">FT</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> <li class="tsd-parameter"> <h5>success<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ST</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ST</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> <li class="tsd-parameter"> <h5>trigger<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <a href="_types_.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> </ul> </li> <li class="tsd-description"> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>P</h4> </li> <li> <h4>SP</h4> </li> <li> <h4>FP</h4> </li> <li> <h4>H</h4> </li> <li> <h4>R</h4> </li> <li> <h4>SH</h4> </li> <li> <h4>SR</h4> </li> <li> <h4>FH</h4> </li> <li> <h4>FR</h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> handleAction: <a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">H</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> handleSuccess: <a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">SP</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SR</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">SH</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> handleFailure: <a href="" class="tsd-signature-type">handleAction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">FP</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">FR</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">FH</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol"> &amp; </span> <a href="_index_.html#invokesignature" class="tsd-signature-type">invokeSignature</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span> </h4> </li> </ul> </li> </ul> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a name="promisehandler" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagConst">Const</span> promise<wbr>Handler</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon">promise<wbr>Handler&lt;T, P, R&gt;<span class="tsd-signature-symbol">(</span>innerSaga<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">innerFunction</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L9">index.ts:9</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Automatically resolves promise of Action.promise</p> </div> </div> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>T<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4> </li> <li> <h4>P</h4> </li> <li> <h4>R</h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>innerSaga: <span class="tsd-signature-type">function</span></h5> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Generator Function for redux-saga</p> </div> </div> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>args<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">P</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> args: <a href="" class="tsd-signature-type">P</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">R</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </li> </ul> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">innerFunction</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="put" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagConst">Const</span> put</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">put<span class="tsd-signature-symbol">(</span>action<span class="tsd-signature-symbol">: </span><a href="../interfaces/_index_.ia.html" class="tsd-signature-type">Ia</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_index_.iput.html" class="tsd-signature-type">Iput</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L245">index.ts:245</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>action: <a href="../interfaces/_index_.ia.html" class="tsd-signature-type">Ia</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../interfaces/_index_.iput.html" class="tsd-signature-type">Iput</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"> <a name="reg" class="tsd-anchor"></a> <h3>reg</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"> <li class="tsd-signature tsd-kind-icon">reg&lt;T&gt;<span class="tsd-signature-symbol">(</span>t<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-type">T</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/thu-san/redux-actions-promise-wrapper/blob/dcc1deb/src/index.ts#L67">index.ts:67</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Generator return value</p> </div> </div> <h4 class="tsd-type-parameters-title">Type parameters</h4> <ul class="tsd-type-parameters"> <li> <h4>T</h4> </li> </ul> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>t: <span class="tsd-signature-type">T</span></h5> <div class="tsd-comment tsd-typography"> <p>any</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol"> &amp; </span> <span class="tsd-signature-type">T</span> </h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-external-module"> <a href="_index_.html">"index"</a> </li> <li class=" tsd-kind-external-module"> <a href="_index_test_.html">"index.test"</a> </li> <li class=" tsd-kind-external-module"> <a href="_types_.html">"types"</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_index_.ia.html" class="tsd-kind-icon">Ia</a> </li> <li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"> <a href="../interfaces/_index_.iput.html" class="tsd-kind-icon">Iput</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter"> <a href="_index_.html#actionunion" class="tsd-kind-icon">Action<wbr>Union</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter"> <a href="_index_.html#extractactions" class="tsd-kind-icon">Extract<wbr>Actions</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a href="_index_.html#actionhandler" class="tsd-kind-icon">action<wbr>Handler</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a href="_index_.html#handleaction" class="tsd-kind-icon">handle<wbr>Action</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a href="_index_.html#invokesignature" class="tsd-kind-icon">invoke<wbr>Signature</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter tsd-is-not-exported"> <a href="_index_.html#actioncreator" class="tsd-kind-icon">action<wbr>Creator</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-has-type-parameter"> <a href="_index_.html#createaction" class="tsd-kind-icon">create<wbr>Action</a> </li> <li class=" tsd-kind-func