diff --git a/package-lock.json b/package-lock.json index decac54..e666bf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16967,9 +16967,9 @@ } }, "typescript": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.6.tgz", - "integrity": "sha512-+eGgIo8Fl3l2B9Red9Q3VIkjMlUmaqELTJlsMqnHRe8V85DxJtr1q6Omjs0xBzXl0foNfCWu0fTf4jZ2LyWKPw==" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==" }, "typescript-fsa": { "version": "3.0.0", diff --git a/package.json b/package.json index cba8bfa..b5e5ead 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "redux": "^4.1.0", "redux-saga": "^0.16.2", "sass": "^1.32.12", - "typescript": "^4.0.6", + "typescript": "^4.2.4", "typescript-fsa": "^3.0.0" }, "scripts": { 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"] }