diff --git a/src/pages/create/createSaga.ts b/src/pages/create/createSaga.ts index a56bfa9..d18c244 100644 --- a/src/pages/create/createSaga.ts +++ b/src/pages/create/createSaga.ts @@ -8,10 +8,16 @@ import { IState } from "../../reducer"; import { CardSetServiceId, ICardSetService } from "../../services/cardSets"; import { Services } from "../../services/services"; import { ISessionService, SessionServiceId } from "../../services/sessions"; -import { ITeamService, TeamServiceId } from "../../services/teams"; +import { + IIteration, + ITeam, + ITeamService, + TeamServiceId +} from "../../services/teams"; import { loadSessions } from "../home/sessionsActions"; import * as Actions from "./createActions"; import { IIdentityService, IdentityServiceId } from "../../services/identity"; +import { ICardSet } from "../../model/cards"; export function* createSaga() { yield all([initSaga(), iterationSaga(), createSessionSaga()]); @@ -37,7 +43,7 @@ export function* loadTeams() { // TODO: Get source from state? const teamService = Services.getService(TeamServiceId); - const teams = yield call( + const teams: ITeam[] = yield call( [teamService, teamService.getAllTeams], projectInfo.id ); @@ -48,7 +54,10 @@ export function* loadTeams() { export function* loadCardSets() { const cardSetService = Services.getService(CardSetServiceId); - const cardSets = yield call([cardSetService, cardSetService.getSets]); + const cardSets: ICardSet[] = yield call([ + cardSetService, + cardSetService.getSets + ]); yield put(Actions.setCardSets(cardSets)); } @@ -58,7 +67,7 @@ export function* iterationSaga() { ); const teamService = Services.getService(TeamServiceId); - const iterations = yield call( + const iterations: IIteration[] = yield call( [teamService, teamService.getIterationsForTeam], action.payload ); diff --git a/src/pages/session/channelSaga.ts b/src/pages/session/channelSaga.ts index 4d9575f..54c16dc 100644 --- a/src/pages/session/channelSaga.ts +++ b/src/pages/session/channelSaga.ts @@ -8,7 +8,7 @@ import { take, takeEvery } from "redux-saga/effects"; -import { Action } from "typescript-fsa"; +import { Action, AnyAction } from "typescript-fsa"; import { ISession } from "../../model/session"; import { ISnapshot } from "../../model/snapshots"; import { IChannel } from "../../services/channels/channels"; @@ -87,7 +87,7 @@ export function* channelSenderSaga(sessionId: string, channel: IChannel) { export function* channelListenerSaga(channel: IChannel) { const subscription: Channel<{}> = yield call(subscribe, channel); while (true) { - const action = yield take(subscription); + const action: AnyAction = yield take(subscription); switch (action.type) { case userJoined.type: { diff --git a/src/pages/session/sessionSaga.ts b/src/pages/session/sessionSaga.ts index da3d0a0..9e3e827 100644 --- a/src/pages/session/sessionSaga.ts +++ b/src/pages/session/sessionSaga.ts @@ -165,8 +165,8 @@ export function* sessionSaga(action: ReturnType) { }) ); - const estimationTask = yield fork(sessionEstimationSaga); - const notificationTask = yield fork(notificationSaga); + const estimationTask: Task = yield fork(sessionEstimationSaga); + const notificationTask: Task = yield fork(notificationSaga); // Wait for leave or end const a: diff --git a/tsconfig.json b/tsconfig.json index 22c0f71..06bab39 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react" + "jsx": "react-jsx" }, "include": ["src"] }