1306 lines
82 KiB
HTML
1306 lines
82 KiB
HTML
<!doctype html>
|
|
<html class="default no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>updux</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">updux</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>
|
|
</ul>
|
|
<h1> updux</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 ">
|
|
<h3>Classes</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/updux.html" class="tsd-kind-icon">Updux</a></li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-index-section ">
|
|
<h3>Interfaces</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/upduxmiddlewareapi.html" class="tsd-kind-icon">Updux<wbr>MiddlewareAPI</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-has-type-parameter"><a href="globals.html#action" class="tsd-kind-icon">Action</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#actioncreator" class="tsd-kind-icon">Action<wbr>Creator</a></li>
|
|
<li class="tsd-kind-type-alias tsd-is-not-exported"><a href="globals.html#actionpair" class="tsd-kind-icon">Action<wbr>Pair</a></li>
|
|
<li class="tsd-kind-type-alias"><a href="globals.html#actionpayloadgenerator" class="tsd-kind-icon">Action<wbr>Payload<wbr>Generator</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#dictionary" class="tsd-kind-icon">Dictionary</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#dux" class="tsd-kind-icon">Dux</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"><a href="globals.html#maybepayload" class="tsd-kind-icon">Maybe<wbr>Payload</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#mutation" class="tsd-kind-icon">Mutation</a></li>
|
|
<li class="tsd-kind-type-alias tsd-is-not-exported"><a href="globals.html#next" class="tsd-kind-icon">Next</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"><a href="globals.html#storewithdispatchactions" class="tsd-kind-icon">Store<wbr>With<wbr>Dispatch<wbr>Actions</a></li>
|
|
<li class="tsd-kind-type-alias tsd-is-not-exported"><a href="globals.html#submutations" class="tsd-kind-icon">Sub<wbr>Mutations</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#upduxconfig" class="tsd-kind-icon">Updux<wbr>Config</a></li>
|
|
<li class="tsd-kind-type-alias"><a href="globals.html#upduxdispatch" class="tsd-kind-icon">Updux<wbr>Dispatch</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#upduxmiddleware" class="tsd-kind-icon">Updux<wbr>Middleware</a></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#upreducer" class="tsd-kind-icon">Upreducer</a></li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-index-section ">
|
|
<h3>Functions</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-function tsd-is-not-exported"><a href="globals.html#middlewarefor" class="tsd-kind-icon">Middleware<wbr>For</a></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#actioncreator" class="tsd-kind-icon">action<wbr>Creator</a></li>
|
|
<li class="tsd-kind-function tsd-is-not-exported"><a href="globals.html#actionfor" class="tsd-kind-icon">action<wbr>For</a></li>
|
|
<li class="tsd-kind-function"><a href="globals.html#buildactions" class="tsd-kind-icon">build<wbr>Actions</a></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#buildcreatestore" class="tsd-kind-icon">build<wbr>Create<wbr>Store</a></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#buildinitial" class="tsd-kind-icon">build<wbr>Initial</a></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#buildmiddleware" class="tsd-kind-icon">build<wbr>Middleware</a></li>
|
|
<li class="tsd-kind-function"><a href="globals.html#buildmutations" class="tsd-kind-icon">build<wbr>Mutations</a></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#buildupreducer" class="tsd-kind-icon">build<wbr>Upreducer</a></li>
|
|
<li class="tsd-kind-function tsd-is-not-exported"><a href="globals.html#composemutations" class="tsd-kind-icon">compose<wbr>Mutations</a></li>
|
|
<li class="tsd-kind-function tsd-is-not-exported"><a href="globals.html#slicemw" class="tsd-kind-icon">slice<wbr>Mw</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-has-type-parameter">
|
|
<a name="action" class="tsd-anchor"></a>
|
|
<h3>Action</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Action<T, P><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> & </span><a href="globals.html#maybepayload" class="tsd-signature-type">MaybePayload</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">P</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L9">types.ts:9</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>P</h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="actioncreator" class="tsd-anchor"></a>
|
|
<h3>Action<wbr>Creator</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Action<wbr>Creator<T, P><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">function</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L22">types.ts:22</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>P</h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-not-exported">
|
|
<a name="actionpair" class="tsd-anchor"></a>
|
|
<h3>Action<wbr>Pair</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Action<wbr>Pair<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">]</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildActions/index.ts#L33">buildActions/index.ts:33</a></li>
|
|
</ul>
|
|
</aside>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias">
|
|
<a name="actionpayloadgenerator" class="tsd-anchor"></a>
|
|
<h3>Action<wbr>Payload<wbr>Generator</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Action<wbr>Payload<wbr>Generator<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L20">types.ts:20</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-siganture">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="dictionary" class="tsd-anchor"></a>
|
|
<h3>Dictionary</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Dictionary<T><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L13">types.ts:13</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>T</h4>
|
|
</li>
|
|
</ul>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-index-signature">
|
|
<h5><span class="tsd-signature-symbol">[</span>key: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">T</span></h5>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="dux" class="tsd-anchor"></a>
|
|
<h3>Dux</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Dux<S><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Pick</span><span class="tsd-signature-symbol"><</span><a href="classes/updux.html" class="tsd-signature-type">Updux</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">"subduxes"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"actions"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"initial"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"mutations"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"reducer"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"middleware"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"createStore"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"upreducer"</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/updux.ts#L33">updux.ts:33</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported">
|
|
<a name="maybepayload" class="tsd-anchor"></a>
|
|
<h3>Maybe<wbr>Payload</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Maybe<wbr>Payload<P><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MaybePayload<P></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L3">types.ts:3</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>P</h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="mutation" class="tsd-anchor"></a>
|
|
<h3>Mutation</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Mutation<S, A><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L15">types.ts:15</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
<li>
|
|
<h4>A<span class="tsd-signature-symbol">: </span><a href="globals.html#action" class="tsd-signature-type">Action</a></h4>
|
|
</li>
|
|
</ul>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-siganture">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>payload<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">A["payload"]</span>, action<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">A</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">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>payload: <span class="tsd-signature-type">A["payload"]</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>action: <span class="tsd-signature-type">A</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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>state: <span class="tsd-signature-type">S</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">S</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-not-exported">
|
|
<a name="next" class="tsd-anchor"></a>
|
|
<h3>Next</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Next<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildMiddleware/index.ts#L12">buildMiddleware/index.ts:12</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-siganture">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>action<span class="tsd-signature-symbol">: </span><a href="globals.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>action: <a href="globals.html#action" class="tsd-signature-type">Action</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported">
|
|
<a name="storewithdispatchactions" class="tsd-anchor"></a>
|
|
<h3>Store<wbr>With<wbr>Dispatch<wbr>Actions</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Store<wbr>With<wbr>Dispatch<wbr>Actions<S, Actions><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Store</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">object</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/updux.ts#L26">updux.ts:26</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
<li>
|
|
<h4>Actions</h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-not-exported">
|
|
<a name="submutations" class="tsd-anchor"></a>
|
|
<h3>Sub<wbr>Mutations</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Sub<wbr>Mutations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildMutations/index.ts#L10">buildMutations/index.ts:10</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-index-signature">
|
|
<h5><span class="tsd-signature-symbol">[</span>slice: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="upduxconfig" class="tsd-anchor"></a>
|
|
<h3>Updux<wbr>Config</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Updux<wbr>Config<S><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L34">types.ts:34</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Configuration object given to Updux's constructor.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Type of the Updux's state. Defaults to <code>any</code>.</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> actions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">object</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Generic action creations are automatically created from the mutations and effects, but you can
|
|
also define custom action creator here. The object's values are function that
|
|
transform the arguments of the creator to the action's payload.</p>
|
|
</div>
|
|
<pre><code><span class="hljs-string">const</span> <span class="hljs-string">{</span> <span class="hljs-string">actions</span> <span class="hljs-string">}</span> <span class="hljs-string">=</span> <span class="hljs-string">updox({</span>
|
|
<span class="hljs-attr">mutations:</span> <span class="hljs-string">{</span>
|
|
<span class="hljs-attr">foo:</span> <span class="hljs-string">()</span> <span class="hljs-string">=></span> <span class="hljs-string">state</span> <span class="hljs-string">=></span> <span class="hljs-string">state,</span>
|
|
<span class="hljs-string">}</span>
|
|
<span class="hljs-attr">actions:</span> <span class="hljs-string">{</span>
|
|
<span class="hljs-attr">bar:</span> <span class="hljs-string">(x,y)</span> <span class="hljs-string">=></span> <span class="hljs-string">({x,y})</span>
|
|
<span class="hljs-string">}</span>
|
|
<span class="hljs-string">});</span>
|
|
|
|
<span class="hljs-string">actions.foo({</span> <span class="hljs-attr">x:</span> <span class="hljs-number">1</span><span class="hljs-string">,</span> <span class="hljs-attr">y:</span> <span class="hljs-number">2</span> <span class="hljs-string">});</span> <span class="hljs-string">//</span> <span class="hljs-string">=></span> <span class="hljs-string">{</span> <span class="hljs-attr">type:</span> <span class="hljs-string">foo,</span> <span class="hljs-attr">payload:</span> <span class="hljs-string">{</span> <span class="hljs-string">x:1,</span> <span class="hljs-string">y:2</span> <span class="hljs-string">}</span> <span class="hljs-string">}</span>
|
|
<span class="hljs-string">actions.bar(1,2);</span> <span class="hljs-string">//</span> <span class="hljs-string">=></span> <span class="hljs-string">{</span> <span class="hljs-attr">type:</span> <span class="hljs-string">bar,</span> <span class="hljs-attr">payload:</span> <span class="hljs-string">{</span> <span class="hljs-string">x:1,</span> <span class="hljs-string">y:2</span> <span class="hljs-string">}</span> <span class="hljs-string">}</span></code></pre>
|
|
</div>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> effects<span class="tsd-signature-symbol">?: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#upduxmiddleware" class="tsd-signature-type">UpduxMiddleware</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Plain object defining asynchronous actions and side-effects triggered by actions.
|
|
The effects themselves are Redux middleware, expect with the <code>dispatch</code>
|
|
property of the first argument augmented with all the available actions.</p>
|
|
</div>
|
|
<pre><code>updux({
|
|
effects: {
|
|
fetch: ({dispatch}) => next => async (<span class="hljs-name">action</span>) => {
|
|
next(<span class="hljs-name">action</span>)<span class="hljs-comment">;</span>
|
|
|
|
let result = await fetch(<span class="hljs-name">action</span>.payload.url).then( <span class="hljs-name">result</span> => result.json() )<span class="hljs-comment">;</span>
|
|
dispatch.fetchSuccess(<span class="hljs-name">result</span>)<span class="hljs-comment">;</span>
|
|
}
|
|
}
|
|
})<span class="hljs-comment">;</span></code></pre>
|
|
</div>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> groom<wbr>Mutations<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">function</span></h5>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> initial<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">S</a></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>The default initial state of the reducer. Can be anything your
|
|
heart desires.</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> mutations<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Object mapping actions to the associated state mutation.</p>
|
|
</div>
|
|
<p>For example, in <code>Redux</code> you'd do</p>
|
|
<pre><code>function todosReducer(<span class="hljs-keyword">state</span>=[],action) {
|
|
|
|
switch(action.type) {
|
|
case 'ADD': return [ ...<span class="hljs-keyword">state</span>, action.payload ];
|
|
|
|
case 'DONE': return <span class="hljs-keyword">state</span>.map( todo => todo.id === action.payload
|
|
? { ...todo, done: true } : todo )
|
|
|
|
<span class="hljs-keyword">default</span>: return <span class="hljs-keyword">state</span>;
|
|
}
|
|
}</code></pre><p>With Updux:</p>
|
|
<pre><code>const todosUpdux = updux({
|
|
mutations: {
|
|
add: todo => <span class="hljs-keyword">state</span> => [ ...<span class="hljs-keyword">state</span>, todo ],
|
|
done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) )
|
|
}
|
|
});</code></pre><p>The signature of the mutations is <code>(payload,action) => state => newState</code>.
|
|
It is designed to play well with <code>Updeep</code> (and <a href="https://immerjs.github.io/immer/docs/introduction">Immer</a>). This way, instead of doing</p>
|
|
<pre><code> mutation: {
|
|
renameTodo: newName => <span class="hljs-keyword">state</span> => { ...<span class="hljs-keyword">state</span>, name: newName }
|
|
}</code></pre><p>we can do</p>
|
|
<pre><code> <span class="hljs-selector-tag">mutation</span>: {
|
|
<span class="hljs-attribute">renameTodo</span>: newName => <span class="hljs-built_in">u</span>({ name: newName })
|
|
}</code></pre><p>Also, the special key <code>*</code> can be used to match any
|
|
action not explicitly matched by other mutations.</p>
|
|
<pre><code>const todosUpdux = updux({
|
|
mutations: {
|
|
add: todo => <span class="hljs-keyword">state</span> => [ ...<span class="hljs-keyword">state</span>, todo ],
|
|
done: done_id => u.map( u.if( ({id} => id === done_id), {done: true} ) ),
|
|
'*' (payload,action) => <span class="hljs-keyword">state</span> => {
|
|
console.warn( <span class="hljs-string">"unexpected action "</span>, action.type );
|
|
return <span class="hljs-keyword">state</span>;
|
|
},
|
|
}
|
|
});</code></pre>
|
|
</div>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> subduxes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">__type</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Object mapping slices of the state to sub-upduxes.</p>
|
|
</div>
|
|
<p>For example, if in plain Redux you would do</p>
|
|
<pre><code><span class="hljs-keyword">import</span> { combineReducers } <span class="hljs-keyword">from</span> <span class="hljs-string">'redux'</span>;
|
|
<span class="hljs-keyword">import</span> todosReducer <span class="hljs-keyword">from</span> <span class="hljs-string">'./todos'</span>;
|
|
<span class="hljs-keyword">import</span> statisticsReducer <span class="hljs-keyword">from</span> <span class="hljs-string">'./statistics'</span>;
|
|
|
|
<span class="hljs-keyword">const</span> rootReducer = combineReducers({
|
|
<span class="hljs-attr">todos</span>: todosReducer,
|
|
<span class="hljs-attr">stats</span>: statisticsReducer,
|
|
});</code></pre><p>then with Updux you'd do</p>
|
|
<pre><code><span class="hljs-keyword">import</span> { updux } <span class="hljs-keyword">from</span> <span class="hljs-string">'updux'</span>;
|
|
<span class="hljs-keyword">import</span> todos <span class="hljs-keyword">from</span> <span class="hljs-string">'./todos'</span>;
|
|
<span class="hljs-keyword">import</span> <span class="hljs-keyword">statistics</span> <span class="hljs-keyword">from</span> <span class="hljs-string">'./statistics'</span>;
|
|
|
|
const rootUpdux = updux({
|
|
subduxes: {
|
|
todos, <span class="hljs-keyword">statistics</span>
|
|
}
|
|
});</code></pre>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias">
|
|
<a name="upduxdispatch" class="tsd-anchor"></a>
|
|
<h3>Updux<wbr>Dispatch</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Updux<wbr>Dispatch<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol"> & </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">></span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L27">types.ts:27</a></li>
|
|
</ul>
|
|
</aside>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="upduxmiddleware" class="tsd-anchor"></a>
|
|
<h3>Updux<wbr>Middleware</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Updux<wbr>Middleware<S><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L192">types.ts:192</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
</ul>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-siganture">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>api<span class="tsd-signature-symbol">: </span><a href="interfaces/upduxmiddlewareapi.html" class="tsd-signature-type">UpduxMiddlewareAPI</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></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">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>api: <a href="interfaces/upduxmiddlewareapi.html" class="tsd-signature-type">UpduxMiddlewareAPI</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>next<span class="tsd-signature-symbol">: </span><a href="globals.html#upduxdispatch" class="tsd-signature-type">UpduxDispatch</a><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">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>next: <a href="globals.html#upduxdispatch" class="tsd-signature-type">UpduxDispatch</a></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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>action<span class="tsd-signature-symbol">: </span><a href="globals.html#action" class="tsd-signature-type">Action</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>action: <a href="globals.html#action" class="tsd-signature-type">Action</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a name="upreducer" class="tsd-anchor"></a>
|
|
<h3>Upreducer</h3>
|
|
<div class="tsd-signature tsd-kind-icon">Upreducer<S><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/types.ts#L184">types.ts:184</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
</ul>
|
|
<div class="tsd-type-declaration">
|
|
<h4>Type declaration</h4>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-siganture">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>action<span class="tsd-signature-symbol">: </span><a href="globals.html#action" class="tsd-signature-type">Action</a><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">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>action: <a href="globals.html#action" class="tsd-signature-type">Action</a></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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>state: <span class="tsd-signature-type">S</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">S</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
<h2>Functions</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-is-not-exported">
|
|
<a name="middlewarefor" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> Middleware<wbr>For</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon">Middleware<wbr>For<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, mw<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Middleware</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Middleware</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildMiddleware/index.ts#L6">buildMiddleware/index.ts:6</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>type: <span class="tsd-signature-type">any</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>mw: <span class="tsd-signature-type">Middleware</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Middleware</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter">
|
|
<a name="actioncreator" class="tsd-anchor"></a>
|
|
<h3>action<wbr>Creator</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter">
|
|
<li class="tsd-signature tsd-kind-icon">action<wbr>Creator<T, P><span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, transform<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><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol"><</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></li>
|
|
<li class="tsd-signature tsd-kind-icon">action<wbr>Creator<T><span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, transform<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">never</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></li>
|
|
<li class="tsd-signature tsd-kind-icon">action<wbr>Creator<T><span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, transform<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildActions/index.ts#L4">buildActions/index.ts:4</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>P<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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>transform: <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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">P</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-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">P</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol"><</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></h4>
|
|
</li>
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildActions/index.ts#L5">buildActions/index.ts:5</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>
|
|
<li>
|
|
<h5>transform: <span class="tsd-signature-type">never</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildActions/index.ts#L6">buildActions/index.ts:6</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>
|
|
<li>
|
|
<h5>transform: <span class="tsd-signature-type">null</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-is-not-exported">
|
|
<a name="actionfor" class="tsd-anchor"></a>
|
|
<h3>action<wbr>For</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon">action<wbr>For<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildActions/index.ts#L22">buildActions/index.ts:22</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>type: <span class="tsd-signature-type">string</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function">
|
|
<a name="buildactions" class="tsd-anchor"></a>
|
|
<h3>build<wbr>Actions</h3>
|
|
<ul class="tsd-signatures tsd-kind-function">
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Actions<span class="tsd-signature-symbol">(</span>generators<span class="tsd-signature-symbol">?: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actionpayloadgenerator" class="tsd-signature-type">ActionPayloadGenerator</a><span class="tsd-signature-symbol">></span>, actionNames<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, subActions<span class="tsd-signature-symbol">?: </span><a href="globals.html#actionpair" class="tsd-signature-type">ActionPair</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildActions/index.ts#L35">buildActions/index.ts:35</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> generators: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actionpayloadgenerator" class="tsd-signature-type">ActionPayloadGenerator</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> actionNames: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> subActions: <a href="globals.html#actionpair" class="tsd-signature-type">ActionPair</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter">
|
|
<a name="buildcreatestore" class="tsd-anchor"></a>
|
|
<h3>build<wbr>Create<wbr>Store</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter">
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Create<wbr>Store<S><span class="tsd-signature-symbol">(</span>reducer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Reducer</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span>, initial<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span>, middleware<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Middleware</span>, actions<span class="tsd-signature-symbol">: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">></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/yanick/updux/blob/8d4542f/src/buildCreateStore/index.ts#L9">buildCreateStore/index.ts:9</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>reducer: <span class="tsd-signature-type">Reducer</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>initial: <span class="tsd-signature-type">S</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>middleware: <span class="tsd-signature-type">Middleware</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>actions: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">></span></h5>
|
|
</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-has-type-parameter">
|
|
<a name="buildinitial" class="tsd-anchor"></a>
|
|
<h3>build<wbr>Initial</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter">
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Initial<S><span class="tsd-signature-symbol">(</span>initial<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span>, subduxes<span class="tsd-signature-symbol">?: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span></li>
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Initial<S><span class="tsd-signature-symbol">(</span>initial<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span>, subduxes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S extends object ? S : never</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildInitial/index.ts#L4">buildInitial/index.ts:4</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></h4>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>initial: <span class="tsd-signature-type">S</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> subduxes: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">S</span></h4>
|
|
</li>
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildInitial/index.ts#L5">buildInitial/index.ts:5</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h4>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> initial: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> subduxes: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">S extends object ? S : never</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter">
|
|
<a name="buildmiddleware" class="tsd-anchor"></a>
|
|
<h3>build<wbr>Middleware</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter">
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Middleware<S><span class="tsd-signature-symbol">(</span>effects<span class="tsd-signature-symbol">?: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#upduxmiddleware" class="tsd-signature-type">UpduxMiddleware</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span>, actions<span class="tsd-signature-symbol">?: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">></span>, subduxes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="globals.html#upduxmiddleware" class="tsd-signature-type">UpduxMiddleware</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildMiddleware/index.ts#L22">buildMiddleware/index.ts:22</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> effects: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#upduxmiddleware" class="tsd-signature-type">UpduxMiddleware</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> actions: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#actioncreator" class="tsd-signature-type">ActionCreator</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> subduxes: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#upduxmiddleware" class="tsd-signature-type">UpduxMiddleware</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function">
|
|
<a name="buildmutations" class="tsd-anchor"></a>
|
|
<h3>build<wbr>Mutations</h3>
|
|
<ul class="tsd-signatures tsd-kind-function">
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Mutations<span class="tsd-signature-symbol">(</span>mutations<span class="tsd-signature-symbol">?: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">></span>, subduxes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Dictionary</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildMutations/index.ts#L14">buildMutations/index.ts:14</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> mutations: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> subduxes: <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
<ul class="tsd-parameters">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Dictionary</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter">
|
|
<a name="buildupreducer" class="tsd-anchor"></a>
|
|
<h3>build<wbr>Upreducer</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter">
|
|
<li class="tsd-signature tsd-kind-icon">build<wbr>Upreducer<S><span class="tsd-signature-symbol">(</span>initial<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span>, mutations<span class="tsd-signature-symbol">: </span><a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="globals.html#upreducer" class="tsd-signature-type">Upreducer</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildUpreducer/index.ts#L5">buildUpreducer/index.ts:5</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-type-parameters-title">Type parameters</h4>
|
|
<ul class="tsd-type-parameters">
|
|
<li>
|
|
<h4>S</h4>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>initial: <span class="tsd-signature-type">S</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>mutations: <a href="globals.html#dictionary" class="tsd-signature-type">Dictionary</a><span class="tsd-signature-symbol"><</span><a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="globals.html#upreducer" class="tsd-signature-type">Upreducer</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">></span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-is-not-exported">
|
|
<a name="composemutations" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> compose<wbr>Mutations</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon">compose<wbr>Mutations<span class="tsd-signature-symbol">(</span>mutations<span class="tsd-signature-symbol">: </span><a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol">[]</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/yanick/updux/blob/8d4542f/src/buildMutations/index.ts#L5">buildMutations/index.ts:5</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>mutations: <a href="globals.html#mutation" class="tsd-signature-type">Mutation</a><span class="tsd-signature-symbol">[]</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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>payload<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">A["payload"]</span>, action<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">A</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">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>payload: <span class="tsd-signature-type">A["payload"]</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>action: <span class="tsd-signature-type">A</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-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>state: <span class="tsd-signature-type">S</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">S</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-is-not-exported">
|
|
<a name="slicemw" class="tsd-anchor"></a>
|
|
<h3>slice<wbr>Mw</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon">slice<wbr>Mw<span class="tsd-signature-symbol">(</span>slice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, mw<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Middleware</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Middleware</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/yanick/updux/blob/8d4542f/src/buildMiddleware/index.ts#L14">buildMiddleware/index.ts:14</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>slice: <span class="tsd-signature-type">string</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>mw: <span class="tsd-signature-type">Middleware</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Middleware</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 current ">
|
|
<a href="globals.html"><em>Globals</em></a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul class="before-current">
|
|
<li class=" tsd-kind-class tsd-has-type-parameter">
|
|
<a href="classes/updux.html" class="tsd-kind-icon">Updux</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface tsd-has-type-parameter">
|
|
<a href="interfaces/upduxmiddlewareapi.html" class="tsd-kind-icon">Updux<wbr>MiddlewareAPI</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#action" class="tsd-kind-icon">Action</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#actioncreator" class="tsd-kind-icon">Action<wbr>Creator</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-is-not-exported">
|
|
<a href="globals.html#actionpair" class="tsd-kind-icon">Action<wbr>Pair</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias">
|
|
<a href="globals.html#actionpayloadgenerator" class="tsd-kind-icon">Action<wbr>Payload<wbr>Generator</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#dictionary" class="tsd-kind-icon">Dictionary</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#dux" class="tsd-kind-icon">Dux</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported">
|
|
<a href="globals.html#maybepayload" class="tsd-kind-icon">Maybe<wbr>Payload</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#mutation" class="tsd-kind-icon">Mutation</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-is-not-exported">
|
|
<a href="globals.html#next" class="tsd-kind-icon">Next</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported">
|
|
<a href="globals.html#storewithdispatchactions" class="tsd-kind-icon">Store<wbr>With<wbr>Dispatch<wbr>Actions</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-is-not-exported">
|
|
<a href="globals.html#submutations" class="tsd-kind-icon">Sub<wbr>Mutations</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#upduxconfig" class="tsd-kind-icon">Updux<wbr>Config</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias">
|
|
<a href="globals.html#upduxdispatch" class="tsd-kind-icon">Updux<wbr>Dispatch</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#upduxmiddleware" class="tsd-kind-icon">Updux<wbr>Middleware</a>
|
|
</li>
|
|
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
|
|
<a href="globals.html#upreducer" class="tsd-kind-icon">Upreducer</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-is-not-exported">
|
|
<a href="globals.html#middlewarefor" class="tsd-kind-icon">Middleware<wbr>For</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-has-type-parameter">
|
|
<a href="globals.html#actioncreator" class="tsd-kind-icon">action<wbr>Creator</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-is-not-exported">
|
|
<a href="globals.html#actionfor" class="tsd-kind-icon">action<wbr>For</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="globals.html#buildactions" class="tsd-kind-icon">build<wbr>Actions</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-has-type-parameter">
|
|
<a href="globals.html#buildcreatestore" class="tsd-kind-icon">build<wbr>Create<wbr>Store</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-has-type-parameter">
|
|
<a href="globals.html#buildinitial" class="tsd-kind-icon">build<wbr>Initial</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-has-type-parameter">
|
|
<a href="globals.html#buildmiddleware" class="tsd-kind-icon">build<wbr>Middleware</a>
|
|
</li>
|
|
<li class=" tsd-kind-function">
|
|
<a href="globals.html#buildmutations" class="tsd-kind-icon">build<wbr>Mutations</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-has-type-parameter">
|
|
<a href="globals.html#buildupreducer" class="tsd-kind-icon">build<wbr>Upreducer</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-is-not-exported">
|
|
<a href="globals.html#composemutations" class="tsd-kind-icon">compose<wbr>Mutations</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-is-not-exported">
|
|
<a href="globals.html#slicemw" class="tsd-kind-icon">slice<wbr>Mw</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="with-border-bottom">
|
|
<div class="container">
|
|
<h2>Legend</h2>
|
|
<div class="tsd-legend-group">
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
|
|
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
|
|
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
|
|
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
|
|
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
|
|
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<div class="container tsd-generator">
|
|
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
</div>
|
|
<div class="overlay"></div>
|
|
<script src="assets/js/main.js"></script>
|
|
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
|
|
</body>
|
|
</html> |