Open Morphexe opened 7 years ago
Ok , so this seems to be related to a export in the offending module.
if I export the reducer without the : any annotation, all the export from this module seem to not work
export const reducer : any = handleActions(
{
[LoggedOut]: (state, action) => ({
...state,
auth: null,
}),
[LoggedIn]: (state, action) => ({
...state,
auth: false,
}),
[LoginToggle]: (state, action) => ({
...state,
loginVisible: action.payload,
}),
},
{auth: null, loginVisible: false},
);
Just wondering is this the desired behaviour or is there something else that I missed? For now I am exporting the reducers as any, it seems to solve the issue.
I have this in my .flowconfig:
And I am using in another file:
If i do a get-def in either ClassA or ClassB (char 10, line 2), I get:
{"path":"","line":0,"endline":0,"start":1,"end":0}
If I do it in the STUB (char 36, line 2) part I get the correct file and definition:
{"path":"E:\\Desktop\\React Gesp Final\\src\\redux\\action\\auth.js","line":0,"endline":0,"start":1,"end":0}
Am I missing something? Both ClassA and ClassB are Es6 classes exported from the file in question, the code works in production.
Shouldnt FLOW point to the actualy location of ClassA and ClassB on the auth.js file?
This is using the CLI directly after booting the server.