@@ -23,7 +23,7 @@ import type {
2323 UserPreferences ,
2424 VerifyEmailQuery
2525} from '../../../common/types' ;
26- import { RootState } from '../../reducers' ;
26+ import type { GetRootState , RootState } from '../../reducers' ;
2727
2828export function authError ( error : Error ) {
2929 return {
@@ -76,7 +76,7 @@ export function validateAndLoginUser(formProps: {
7676} ) {
7777 return (
7878 dispatch : ThunkDispatch < RootState , unknown , AnyAction > ,
79- getState : ( ) => RootState
79+ getState : GetRootState
8080 ) => {
8181 const state = getState ( ) ;
8282 const { previousPath } = state . ide ;
@@ -115,7 +115,7 @@ export function validateAndLoginUser(formProps: {
115115 * - Create a new user
116116 */
117117export function validateAndSignUpUser ( formValues : CreateUserRequestBody ) {
118- return ( dispatch : Dispatch , getState : ( ) => RootState ) => {
118+ return ( dispatch : Dispatch , getState : GetRootState ) => {
119119 const state = getState ( ) ;
120120 const { previousPath } = state . ide ;
121121 return new Promise < void | PublicUserOrError > ( ( resolve ) => {
@@ -161,7 +161,7 @@ export function getUser() {
161161}
162162
163163export function validateSession ( ) {
164- return async ( dispatch : Dispatch , getState : ( ) => RootState ) => {
164+ return async ( dispatch : Dispatch , getState : GetRootState ) => {
165165 try {
166166 const response = await apiClient . get ( '/session' ) ;
167167 const state = getState ( ) ;
0 commit comments