We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a:
Which concerns:
type ActionTypes = { ... }; type THandlers<TState, TAction: ActionTypes> = { [key: string]: (state: TState, action: TAction) => TState }; type TReducer<TState, TAction: ActionTypes> = (state: TState, action: TAction) => TState; export default function createReducer<TState, TAction: ActionTypes>( initialState: TState, handlers: THandlers<TState, TAction>, ): TReducer<TState, TAction> { return function reducer(state: TState = initialState, action: TAction): TState { if (handlers[action.type]) { return handlers[action.type](state, action); } return state; }; }
This code throws exception that TAction and TState is not defined in line
return function reducer(state: TState = initialState, action: TAction): TState {
If change this codeline to
return function reducer(state: * = initialState, action: *): * {
then exception is missing and code works.
Should work correctly. Works fine without flow-runtime.
flow-runtime version: 0.17.0 babel-plugin-flow-runtime version: 0.18.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a:
Which concerns:
What is the current behaviour?
This code throws exception that TAction and TState is not defined in line
If change this codeline to
then exception is missing and code works.
What is the expected behaviour?
Should work correctly.
Works fine without flow-runtime.
Which package versions are you using?
flow-runtime version: 0.17.0
babel-plugin-flow-runtime version: 0.18.0
The text was updated successfully, but these errors were encountered: