Comparing version 1.0.0-1532084834547 to 1.0.0-1532117391884
import App, { computed } from './'; | ||
describe.only('Computed', () => { | ||
describe('Computed', () => { | ||
test('should instantiate app with computed', () => { | ||
@@ -48,3 +48,3 @@ const app = new App({ | ||
}); | ||
test('should flag as dirty when state changes', () => { | ||
test.only('should flag as dirty when state changes', () => { | ||
let runCount = 0; | ||
@@ -51,0 +51,0 @@ const app = new App({ |
import Devtools from './Devtools'; | ||
import { Action, NoValueAction } from './createActionFactory'; | ||
import { IValueAction, INoValueAction } from './Action'; | ||
export { default as compose } from './compose'; | ||
@@ -22,3 +22,3 @@ export { default as derived } from './derived'; | ||
export interface IAction<State, Context> { | ||
<InitialValue = void>(): [InitialValue] extends [void] ? NoValueAction<State, Context, InitialValue> : Action<State, Context, InitialValue>; | ||
<InitialValue = void>(): [InitialValue] extends [void] ? INoValueAction<State, Context, InitialValue> : IValueAction<State, Context, InitialValue>; | ||
} | ||
@@ -25,0 +25,0 @@ export default class App<State extends object, Providers extends object, Actions extends { |
@@ -1,5 +0,5 @@ | ||
import { actionChainFactory } from 'action-chain'; | ||
import { ActionChain } from 'action-chain'; | ||
import ProxyStateTree from 'proxy-state-tree'; | ||
import Devtools, { safeValue } from './Devtools'; | ||
import createActionFactory from './createActionFactory'; | ||
import Action from './Action'; | ||
import { Computed } from './computed'; | ||
@@ -14,3 +14,3 @@ export { default as compose } from './compose'; | ||
}); | ||
const actionChain = actionChainFactory(Object.assign({ | ||
const actionChain = new ActionChain(Object.assign({ | ||
state: proxyStateTree.get(), | ||
@@ -20,5 +20,4 @@ }, configuration.providers || {}), { | ||
}); | ||
const actionFactory = createActionFactory(proxyStateTree); | ||
const action = function () { | ||
return actionFactory(actionChain); | ||
return new Action(proxyStateTree, actionChain); | ||
}; | ||
@@ -25,0 +24,0 @@ actionChain.on('operator:async', () => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const _1 = require("./"); | ||
describe.only('Computed', () => { | ||
describe('Computed', () => { | ||
test('should instantiate app with computed', () => { | ||
@@ -50,3 +50,3 @@ const app = new _1.default({ | ||
}); | ||
test('should flag as dirty when state changes', () => { | ||
test.only('should flag as dirty when state changes', () => { | ||
let runCount = 0; | ||
@@ -53,0 +53,0 @@ const app = new _1.default({ |
import Devtools from './Devtools'; | ||
import { Action, NoValueAction } from './createActionFactory'; | ||
import { IValueAction, INoValueAction } from './Action'; | ||
export { default as compose } from './compose'; | ||
@@ -22,3 +22,3 @@ export { default as derived } from './derived'; | ||
export interface IAction<State, Context> { | ||
<InitialValue = void>(): [InitialValue] extends [void] ? NoValueAction<State, Context, InitialValue> : Action<State, Context, InitialValue>; | ||
<InitialValue = void>(): [InitialValue] extends [void] ? INoValueAction<State, Context, InitialValue> : IValueAction<State, Context, InitialValue>; | ||
} | ||
@@ -25,0 +25,0 @@ export default class App<State extends object, Providers extends object, Actions extends { |
@@ -6,3 +6,3 @@ "use strict"; | ||
const Devtools_1 = require("./Devtools"); | ||
const createActionFactory_1 = require("./createActionFactory"); | ||
const Action_1 = require("./Action"); | ||
const computed_1 = require("./computed"); | ||
@@ -20,3 +20,3 @@ var compose_1 = require("./compose"); | ||
}); | ||
const actionChain = action_chain_1.actionChainFactory(Object.assign({ | ||
const actionChain = new action_chain_1.ActionChain(Object.assign({ | ||
state: proxyStateTree.get(), | ||
@@ -26,5 +26,4 @@ }, configuration.providers || {}), { | ||
}); | ||
const actionFactory = createActionFactory_1.default(proxyStateTree); | ||
const action = function () { | ||
return actionFactory(actionChain); | ||
return new Action_1.default(proxyStateTree, actionChain); | ||
}; | ||
@@ -31,0 +30,0 @@ actionChain.on('operator:async', () => { |
{ | ||
"name": "overmind", | ||
"version": "1.0.0-1532084834547", | ||
"version": "1.0.0-1532117391884", | ||
"description": "Functional actions", | ||
@@ -36,5 +36,5 @@ "author": "Christian Alfoni <christianalfoni@gmail.com>", | ||
"@types/node": "^10.5.1", | ||
"action-chain": "1.0.0-1532084834547", | ||
"action-chain": "1.0.0-1532117391884", | ||
"is-plain-object": "^2.0.4", | ||
"proxy-state-tree": "1.0.0-1532084834547", | ||
"proxy-state-tree": "1.0.0-1532117391884", | ||
"tslib": "^1.9.3" | ||
@@ -41,0 +41,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2181
235115
+ Addedaction-chain@1.0.0-1532117391884(transitive)
+ Addedproxy-state-tree@1.0.0-1532117391884(transitive)
- Removedaction-chain@1.0.0-1532084834547(transitive)
- Removedproxy-state-tree@1.0.0-1532084834547(transitive)