summaryrefslogtreecommitdiff
path: root/api/pl.treksoft.kvision.redux/-redux-store
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-03-17 01:38:43 +0100
committerRobert Jaros <rjaros@finn.pl>2019-03-17 01:38:43 +0100
commit5c87c4a52e95c942c413324e21034a52fff0ccb3 (patch)
treef1428d11a37ea4504d8caa897c876e7650e2206d /api/pl.treksoft.kvision.redux/-redux-store
parente992f3f13ec46cad15cc7d6982e64ffc7223eb9a (diff)
downloadkvision-5c87c4a52e95c942c413324e21034a52fff0ccb3.tar.gz
kvision-5c87c4a52e95c942c413324e21034a52fff0ccb3.tar.bz2
kvision-5c87c4a52e95c942c413324e21034a52fff0ccb3.zip
API Documentation for KVision 0.0.30
Diffstat (limited to 'api/pl.treksoft.kvision.redux/-redux-store')
-rw-r--r--api/pl.treksoft.kvision.redux/-redux-store/-init-.html30
-rw-r--r--api/pl.treksoft.kvision.redux/-redux-store/dispatch.html18
-rw-r--r--api/pl.treksoft.kvision.redux/-redux-store/get-state.html15
-rw-r--r--api/pl.treksoft.kvision.redux/-redux-store/index.html91
-rw-r--r--api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html15
-rw-r--r--api/pl.treksoft.kvision.redux/-redux-store/subscribe.html15
6 files changed, 184 insertions, 0 deletions
diff --git a/api/pl.treksoft.kvision.redux/-redux-store/-init-.html b/api/pl.treksoft.kvision.redux/-redux-store/-init-.html
new file mode 100644
index 00000000..0c7d04f5
--- /dev/null
+++ b/api/pl.treksoft.kvision.redux/-redux-store/-init-.html
@@ -0,0 +1,30 @@
+<HTML>
+<HEAD>
+<meta charset="UTF-8">
+<title>ReduxStore.<init> - kvision</title>
+<link rel="stylesheet" href="../../../style.css">
+</HEAD>
+<BODY>
+<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.redux</a>&nbsp;/&nbsp;<a href="index.html">ReduxStore</a>&nbsp;/&nbsp;<a href="./-init-.html">&lt;init&gt;</a><br/>
+<br/>
+<h1>&lt;init&gt;</h1>
+<a name="pl.treksoft.kvision.redux.ReduxStore$&lt;init&gt;(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))"></a>
+<code><span class="identifier">ReduxStore</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/reducer">reducer</span><span class="symbol">:</span>&nbsp;<span class="identifier">&lt;ERROR CLASS&gt;</span><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">,</span>&nbsp;<a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/initialState">initialState</span><span class="symbol">:</span>&nbsp;<a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/stateSerializer">stateSerializer</span><span class="symbol">:</span>&nbsp;<span class="identifier">KSerializer</span><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="keyword">vararg</span> <span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/middlewares">middlewares</span><span class="symbol">:</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span></code>
+<p>Creates a Redux store with given reducer function and initial state.</p>
+<h3>Parameters</h3>
+<p><a name="S"></a>
+<code>S</code> - redux state type (@Serializable)</p>
+<p><a name="A"></a>
+<code>A</code> - redux action type</p>
+<p><a name="reducer"></a>
+<code>reducer</code> - a reducer function</p>
+<p><a name="state"></a>
+<code>state</code> - an initial state</p>
+<p><a name="stateSerializer"></a>
+<code>stateSerializer</code> - a serializer for the state type</p>
+<p><a name="middlewares"></a>
+<code>middlewares</code> - a list of optional Redux JS middlewares</p>
+<p><strong>Constructor</strong><br/>
+Creates a Redux store with given reducer function and initial state.</p>
+</BODY>
+</HTML>
diff --git a/api/pl.treksoft.kvision.redux/-redux-store/dispatch.html b/api/pl.treksoft.kvision.redux/-redux-store/dispatch.html
new file mode 100644
index 00000000..864840fe
--- /dev/null
+++ b/api/pl.treksoft.kvision.redux/-redux-store/dispatch.html
@@ -0,0 +1,18 @@
+<HTML>
+<HEAD>
+<meta charset="UTF-8">
+<title>ReduxStore.dispatch - kvision</title>
+<link rel="stylesheet" href="../../../style.css">
+</HEAD>
+<BODY>
+<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.redux</a>&nbsp;/&nbsp;<a href="index.html">ReduxStore</a>&nbsp;/&nbsp;<a href="./dispatch.html">dispatch</a><br/>
+<br/>
+<h1>dispatch</h1>
+<a name="pl.treksoft.kvision.redux.ReduxStore$dispatch(pl.treksoft.kvision.redux.ReduxStore.A)"></a>
+<code><span class="keyword">fun </span><span class="identifier">dispatch</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$dispatch(pl.treksoft.kvision.redux.ReduxStore.A)/action">action</span><span class="symbol">:</span>&nbsp;<a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</span></code>
+<p>Dispatches a synchronous action object.</p>
+<a name="pl.treksoft.kvision.redux.ReduxStore$dispatch(kotlin.Function2((kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.A, )), kotlin.Function0((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Unit)))"></a>
+<code><span class="keyword">fun </span><span class="identifier">dispatch</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$dispatch(kotlin.Function2((kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.A, )), kotlin.Function0((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Unit)))/action">action</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><a href="../-dispatch.html"><span class="identifier">Dispatch</span></a><span class="symbol">&lt;</span><a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">&gt;</span><span class="symbol">,</span>&nbsp;<a href="../-get-state.html"><span class="identifier">GetState</span></a><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">&gt;</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</span></code>
+<p>Dispatches an asynchronous action function.</p>
+</BODY>
+</HTML>
diff --git a/api/pl.treksoft.kvision.redux/-redux-store/get-state.html b/api/pl.treksoft.kvision.redux/-redux-store/get-state.html
new file mode 100644
index 00000000..bf7d9205
--- /dev/null
+++ b/api/pl.treksoft.kvision.redux/-redux-store/get-state.html
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<meta charset="UTF-8">
+<title>ReduxStore.getState - kvision</title>
+<link rel="stylesheet" href="../../../style.css">
+</HEAD>
+<BODY>
+<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.redux</a>&nbsp;/&nbsp;<a href="index.html">ReduxStore</a>&nbsp;/&nbsp;<a href="./get-state.html">getState</a><br/>
+<br/>
+<h1>getState</h1>
+<a name="pl.treksoft.kvision.redux.ReduxStore$getState()"></a>
+<code><span class="keyword">fun </span><span class="identifier">getState</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="index.html#S"><span class="identifier">S</span></a></code>
+<p>Returns the current state.</p>
+</BODY>
+</HTML>
diff --git a/api/pl.treksoft.kvision.redux/-redux-store/index.html b/api/pl.treksoft.kvision.redux/-redux-store/index.html
new file mode 100644
index 00000000..0c8f9a80
--- /dev/null
+++ b/api/pl.treksoft.kvision.redux/-redux-store/index.html
@@ -0,0 +1,91 @@
+<HTML>
+<HEAD>
+<meta charset="UTF-8">
+<title>ReduxStore - kvision</title>
+<link rel="stylesheet" href="../../../style.css">
+</HEAD>
+<BODY>
+<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.redux</a>&nbsp;/&nbsp;<a href="./index.html">ReduxStore</a><br/>
+<br/>
+<h1>ReduxStore</h1>
+<code><span class="keyword">class </span><span class="identifier">ReduxStore</span><span class="symbol">&lt;</span><span class="identifier">S</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">, </span><span class="identifier">A</span><span class="symbol">&gt;</span></code>
+<p>A class implementing redux pattern backed by the original Redux JS library.
+It requires @Serializable state.</p>
+<h3>Constructors</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<p><a href="-init-.html">&lt;init&gt;</a></p>
+</td>
+<td>
+<code><span class="identifier">ReduxStore</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/reducer">reducer</span><span class="symbol">:</span>&nbsp;<span class="identifier">&lt;ERROR CLASS&gt;</span><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">,</span>&nbsp;<a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/initialState">initialState</span><span class="symbol">:</span>&nbsp;<a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/stateSerializer">stateSerializer</span><span class="symbol">:</span>&nbsp;<span class="identifier">KSerializer</span><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="keyword">vararg</span> <span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/middlewares">middlewares</span><span class="symbol">:</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span></code>
+<p>Creates a Redux store with given reducer function and initial state.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<h3>Properties</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<p><a href="state-serializer.html">stateSerializer</a></p>
+</td>
+<td>
+<code><span class="keyword">val </span><span class="identifier">stateSerializer</span><span class="symbol">: </span><span class="identifier">KSerializer</span><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">&gt;</span></code>
+<p>a serializer for the state type</p>
+</td>
+</tr>
+</tbody>
+</table>
+<h3>Functions</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<p><a href="dispatch.html">dispatch</a></p>
+</td>
+<td>
+<code><span class="keyword">fun </span><span class="identifier">dispatch</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$dispatch(pl.treksoft.kvision.redux.ReduxStore.A)/action">action</span><span class="symbol">:</span>&nbsp;<a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</span></code>
+<p>Dispatches a synchronous action object.</p>
+<code><span class="keyword">fun </span><span class="identifier">dispatch</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$dispatch(kotlin.Function2((kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.A, )), kotlin.Function0((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Unit)))/action">action</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><a href="../-dispatch.html"><span class="identifier">Dispatch</span></a><span class="symbol">&lt;</span><a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">&gt;</span><span class="symbol">,</span>&nbsp;<a href="../-get-state.html"><span class="identifier">GetState</span></a><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">&gt;</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</span></code>
+<p>Dispatches an asynchronous action function.</p>
+</td>
+</tr>
+<tr>
+<td>
+<p><a href="get-state.html">getState</a></p>
+</td>
+<td>
+<code><span class="keyword">fun </span><span class="identifier">getState</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="index.html#S"><span class="identifier">S</span></a></code>
+<p>Returns the current state.</p>
+</td>
+</tr>
+<tr>
+<td>
+<p><a href="subscribe.html">subscribe</a></p>
+</td>
+<td>
+<code><span class="keyword">fun </span><span class="identifier">subscribe</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$subscribe(kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.S, kotlin.Unit)))/listener">listener</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="symbol">(</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
+<p>Subscribes a client for the change state notifications.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<h3>Extension Functions</h3>
+<table>
+<tbody>
+<tr>
+<td>
+<p><a href="../../pl.treksoft.kvision.utils/kotlin.-any/create-instance.html">createInstance</a></p>
+</td>
+<td>
+<code><span class="keyword">fun </span><span class="symbol">&lt;</span><span class="identifier">T</span><span class="symbol">&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">?</span><span class="symbol">.</span><span class="identifier">createInstance</span><span class="symbol">(</span><span class="keyword">vararg</span> <span class="identifier" id="pl.treksoft.kvision.utils$createInstance(kotlin.Any, kotlin.Array((kotlin.Any)))/args">args</span><span class="symbol">:</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span><span class="symbol">: </span><a href="../../pl.treksoft.kvision.utils/kotlin.-any/create-instance.html#T"><span class="identifier">T</span></a></code>
+<p>Helper function for creating JavaScript objects from dynamic constructors.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</BODY>
+</HTML>
diff --git a/api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html b/api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html
new file mode 100644
index 00000000..ea96ec0c
--- /dev/null
+++ b/api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<meta charset="UTF-8">
+<title>ReduxStore.stateSerializer - kvision</title>
+<link rel="stylesheet" href="../../../style.css">
+</HEAD>
+<BODY>
+<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.redux</a>&nbsp;/&nbsp;<a href="index.html">ReduxStore</a>&nbsp;/&nbsp;<a href="./state-serializer.html">stateSerializer</a><br/>
+<br/>
+<h1>stateSerializer</h1>
+<a name="pl.treksoft.kvision.redux.ReduxStore$stateSerializer"></a>
+<code><span class="keyword">val </span><span class="identifier">stateSerializer</span><span class="symbol">: </span><span class="identifier">KSerializer</span><span class="symbol">&lt;</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">&gt;</span></code>
+<p>a serializer for the state type</p>
+</BODY>
+</HTML>
diff --git a/api/pl.treksoft.kvision.redux/-redux-store/subscribe.html b/api/pl.treksoft.kvision.redux/-redux-store/subscribe.html
new file mode 100644
index 00000000..55376e06
--- /dev/null
+++ b/api/pl.treksoft.kvision.redux/-redux-store/subscribe.html
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<meta charset="UTF-8">
+<title>ReduxStore.subscribe - kvision</title>
+<link rel="stylesheet" href="../../../style.css">
+</HEAD>
+<BODY>
+<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.redux</a>&nbsp;/&nbsp;<a href="index.html">ReduxStore</a>&nbsp;/&nbsp;<a href="./subscribe.html">subscribe</a><br/>
+<br/>
+<h1>subscribe</h1>
+<a name="pl.treksoft.kvision.redux.ReduxStore$subscribe(kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.S, kotlin.Unit)))"></a>
+<code><span class="keyword">fun </span><span class="identifier">subscribe</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$subscribe(kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.S, kotlin.Unit)))/listener">listener</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="symbol">(</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
+<p>Subscribes a client for the change state notifications.</p>
+</BODY>
+</HTML>