@cerebral/fluent
Advanced tools
Comparing version 1.0.0-1518886037718 to 1.0.0-1518953487795
{ | ||
"name": "@cerebral/fluent", | ||
"version": "1.0.0-1518886037718", | ||
"version": "1.0.0-1518953487795", | ||
"description": "Makes Cerebral typescript friendly", | ||
@@ -27,3 +27,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"cerebral": "^4.2.0-1518886037718", | ||
"cerebral": "^4.2.0-1518953487795", | ||
"mobx": "^3.4.1" | ||
@@ -30,0 +30,0 @@ }, |
@@ -12,3 +12,3 @@ # @cerebral/fluent | ||
To enable type safe mutations the model of this addon is based on [Mobx](https://mobx.js.org/). | ||
To enable type safe mutations, the model of this addon is based on [Mobx](https://mobx.js.org/). | ||
@@ -19,7 +19,6 @@ ## action | ||
import { sequence, Context } from './myFluent' | ||
import * as actions from './actions' | ||
export const doThis = sequence(s => s | ||
.action(function doSomething () { | ||
}) | ||
.action(actions.someAction) | ||
) | ||
@@ -32,7 +31,6 @@ ``` | ||
import { sequence } from './myFluent' | ||
import * as actions from './actions' | ||
export const doThis = Sequence(s => s | ||
.branch(function doSomething ({ path }) { | ||
return path.pathA({}) | ||
}) | ||
.branch(actions.someBranchAction) | ||
.paths({ | ||
@@ -68,2 +66,8 @@ pathA: s => s, | ||
**Computed** also exposes the root state: | ||
```ts | ||
Computed((state, root) => {}) | ||
``` | ||
## connect | ||
@@ -105,3 +109,4 @@ | ||
import { Controller } from '@cerebral/fluent' | ||
import { app, State, Signals } from './app' | ||
import { module as app } from './app' | ||
import { State, Signals } from './fluent' | ||
@@ -121,6 +126,6 @@ const controller = Controller<State, Signals>(app) | ||
```ts | ||
import { TDictionary } from '@cerebral/fluent' | ||
import { Dictionary } from '@cerebral/fluent' | ||
export type State = { | ||
items: TDictionary<string> | ||
items: Dictionary<string> | ||
} | ||
@@ -127,0 +132,0 @@ |
61956
337