From 20dead5ef5882294369fd1d4e71e00ecfb0d9c02 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 2 Mar 2021 14:19:17 +0700 Subject: [PATCH] auth: refactored sagas select typings --- src/redux/auth/sagas.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/redux/auth/sagas.ts b/src/redux/auth/sagas.ts index 71af4744..47e26fa0 100644 --- a/src/redux/auth/sagas.ts +++ b/src/redux/auth/sagas.ts @@ -160,7 +160,9 @@ function* getUpdates() { const modal: ReturnType = yield select(selectModal); const profile: ReturnType = yield select(selectAuthProfile); - const { last, boris_commented_at }: IAuthState['updates'] = yield select(selectAuthUpdates); + const { last, boris_commented_at }: ReturnType = yield select( + selectAuthUpdates + ); const exclude_dialogs = modal.is_shown && modal.dialog === DIALOGS.PROFILE && profile.user?.id ? profile.user.id : 0; @@ -259,7 +261,7 @@ function* restorePassword({ password }: ReturnType) if (!password) return; yield put(authSetRestore({ is_loading: true })); - const { code } = yield select(selectAuthRestore); + const { code }: ReturnType = yield select(selectAuthRestore); if (!code) { return yield put(authSetRestore({ error: ERRORS.CODE_IS_INVALID, is_loading: false })); @@ -376,7 +378,7 @@ function* authRegisterSocial({ username, password }: ReturnType = yield select( + const { token }: ReturnType = yield select( selectAuthRegisterSocial ); @@ -397,8 +399,8 @@ function* authRegisterSocial({ username, password }: ReturnType