diff --git a/package.json b/package.json index bae6bb1..516ba85 100644 --- a/package.json +++ b/package.json @@ -24,4 +24,4 @@ "@pushrocks/lik": "^3.0.4", "rxjs": "^6.4.0" } -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index a89c9b0..dfa11b0 100644 --- a/test/test.ts +++ b/test/test.ts @@ -39,11 +39,11 @@ tap.test('should select something', async () => { tap.test('should dispatch a state action', async () => { const addFavourite = testStatePart.createAction(async (statePart, payload) => { const currentState = statePart.getState(); - currentState.currentFavorites.push(payload) + currentState.currentFavorites.push(payload); return currentState; }); - await testStatePart.dispatchAction(addFavourite, 'my favourite things') - expect(testStatePart.getState().currentFavorites).to.include('my favourite things') + await testStatePart.dispatchAction(addFavourite, 'my favourite things'); + expect(testStatePart.getState().currentFavorites).to.include('my favourite things'); }); tap.start(); diff --git a/ts/smartstate.classes.stateaction.ts b/ts/smartstate.classes.stateaction.ts index 2dadc65..85d7d97 100644 --- a/ts/smartstate.classes.stateaction.ts +++ b/ts/smartstate.classes.stateaction.ts @@ -2,7 +2,7 @@ import * as plugins from './smartstate.plugins'; import { StatePart } from './smartstate.classes.statepart'; export interface IActionDef { - (stateArg: StatePart, actionPayload: TActionPayloadType): Promise; + (stateArg: StatePart, actionPayload: TActionPayloadType): Promise; } /** diff --git a/ts/smartstate.classes.statepart.ts b/ts/smartstate.classes.statepart.ts index b2c8d9f..eedc94a 100644 --- a/ts/smartstate.classes.statepart.ts +++ b/ts/smartstate.classes.statepart.ts @@ -56,7 +56,9 @@ export class StatePart { /** * creates an action capable of modifying the state */ - createAction (actionDef: IActionDef): StateAction { + createAction( + actionDef: IActionDef + ): StateAction { return new StateAction(actionDef); }