mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Improve type checks
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import {
|
||||
PostRequestActionTypes,
|
||||
POST_REQUEST_SUCCESS,
|
||||
} from '../actions/requestPost';
|
||||
|
||||
import {
|
||||
ChangePostBoardSuccessAction,
|
||||
CHANGE_POST_BOARD_SUCCESS,
|
||||
} from '../actions/changePostBoard';
|
||||
|
||||
import {
|
||||
ChangePostStatusSuccessAction,
|
||||
CHANGE_POST_STATUS_SUCCESS,
|
||||
} from '../actions/changePostStatus';
|
||||
|
||||
@@ -25,7 +28,10 @@ const initialState: IPost = {
|
||||
|
||||
const postReducer = (
|
||||
state = initialState,
|
||||
action,
|
||||
action:
|
||||
PostRequestActionTypes |
|
||||
ChangePostBoardSuccessAction |
|
||||
ChangePostStatusSuccessAction,
|
||||
): IPost => {
|
||||
switch (action.type) {
|
||||
case POST_REQUEST_SUCCESS:
|
||||
|
||||
Reference in New Issue
Block a user