summaryrefslogtreecommitdiff
path: root/frontend/src/sagas/home.js
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2018-04-30 00:22:26 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2018-04-30 00:22:26 +0200
commitca90094c8fb30ffd29f6d53f2d2ac71f55a45e94 (patch)
treebfed2efbd9f0b94646eeb287b5188df4420901d5 /frontend/src/sagas/home.js
parentRemove unused history variable from rootSaga (diff)
downloadseven-wonders-ca90094c8fb30ffd29f6d53f2d2ac71f55a45e94.tar.gz
seven-wonders-ca90094c8fb30ffd29f6d53f2d2ac71f55a45e94.tar.bz2
seven-wonders-ca90094c8fb30ffd29f6d53f2d2ac71f55a45e94.zip
Fix sagas types
Diffstat (limited to 'frontend/src/sagas/home.js')
-rw-r--r--frontend/src/sagas/home.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/sagas/home.js b/frontend/src/sagas/home.js
index c55986c3..328102fb 100644
--- a/frontend/src/sagas/home.js
+++ b/frontend/src/sagas/home.js
@@ -1,13 +1,13 @@
// @flow
import { push } from 'react-router-redux';
+import type { SagaIterator } from 'redux-saga';
import { eventChannel } from 'redux-saga';
import { all, apply, call, put, take } from 'redux-saga/effects';
import type { ApiPlayer } from '../api/model';
import type { SevenWondersSession } from '../api/sevenWondersApi';
-
import { actions, types } from '../redux/players';
-function* sendUsername(session: SevenWondersSession): * {
+function* sendUsername(session: SevenWondersSession): SagaIterator {
while (true) {
const { username } = yield take(types.REQUEST_CHOOSE_USERNAME);
// $FlowFixMe
@@ -15,7 +15,7 @@ function* sendUsername(session: SevenWondersSession): * {
}
}
-function* validateUsername(session: SevenWondersSession): * {
+function* validateUsername(session: SevenWondersSession): SagaIterator {
const usernameChannel = yield eventChannel(session.watchNameChoice());
while (true) {
const user: ApiPlayer = yield take(usernameChannel);
@@ -25,6 +25,6 @@ function* validateUsername(session: SevenWondersSession): * {
}
}
-export function* homeSaga(session: SevenWondersSession): * {
+export function* homeSaga(session: SevenWondersSession): SagaIterator {
yield all([call(sendUsername, session), call(validateUsername, session)]);
}
bgstack15