Open dougalg opened 4 years ago
In theory, given that the modules are not namespaced, I should be able to access them from anywhere, so give:
interface UserStore { [SET_USER](user: User): void [details: number]: User; } interface CurrentUserStore { currentUserId: number, [SET_CURRENT_USER](user_id: number): void [CLEAR_CURRENT_USER](): void [LOG_IN](payload: LoginRequest): Promise<User|ApiLoginError> } interface MyStore { modules: { user: UserStore, currentUser: CurrentUserStore, } }
The LOG_IN action should be able to access SET_USER, but it doesn't seem to be available to me in the typings. Maybe I'm just missing something here?
LOG_IN
SET_USER
I was able to get it to work by adding { root: true }. But that shouldn't be necessary, right?
{ root: true }
That's true - thanks for bringing it up
In theory, given that the modules are not namespaced, I should be able to access them from anywhere, so give:
The
LOG_IN
action should be able to accessSET_USER
, but it doesn't seem to be available to me in the typings. Maybe I'm just missing something here?