You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried flow 0.57.3 inside various projects where I used 0.56.0 before.
I made a few errors on purpose, which the old version showed correctly.
On 0.57.3 however flow says No Errors.
Am I doing something wrong or does the current version not work?
On a side-note:
Following the offical documentation I am using
a disjoint Union for redux actions. I was expecting flow to throw an error if I do not provide
cases for every action in my reducer, but flow somehow seems to be fine with that.
// typesconstINIT='INIT'constUSER_FETCH_SUCCESS='USER_FETCH_SUCCESS'constUSER_FETCH_FAIL='USER_FETCH_FAIL'typeUser={+id: string,+name: string,+age: number}typeInit={|type: typeofINIT|}typeUserFetchSuccess={|type: typeofUSER_FETCH_SUCCESS,payload: User|}typeUserFetchFail={|type: typeofUSER_FETCH_FAIL,payload: Object|}typeAction=Init|UserFetchSuccess|UserFetchFail// ReducerconstfakeUserReducer=(state: State={loading: false,user: null,error: null},action: Action): State=>{switch(action.type){caseINIT:
returnloop({...state,loading: true},Cmd.run(fetchUser,{successActionCreator: userFetchSuccessfulAction,failActionCreator: userFetchFailedAction,args: ['userA']}))caseUSER_FETCH_SUCCESS:
return{ ...state,user: action.payload,loading: false}// Flow wont throw an error, even if this case is missing// case USER_FETCH_FAIL:// return { ...state, error: action.payload, loading: false }default:
returnstate}}
The text was updated successfully, but these errors were encountered:
I tried flow 0.57.3 inside various projects where I used 0.56.0 before.
I made a few errors on purpose, which the old version showed correctly.
On 0.57.3 however flow says No Errors.
Am I doing something wrong or does the current version not work?
On a side-note:
Following the offical documentation I am using
a disjoint Union for redux actions. I was expecting flow to throw an error if I do not provide
cases for every action in my reducer, but flow somehow seems to be fine with that.
The text was updated successfully, but these errors were encountered: