Created
January 17, 2020 18:46
-
-
Save Announcement/aabe15be9ed3f9f1c170cc389718dba2 to your computer and use it in GitHub Desktop.
unexpected token @ row: 2, column: 78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
function _createReducer<T, K>(handler: { [$PropertyType<K, 'type'>]: ({ action, state }: { action: K, state: T }) => T }): (state: T, action: K) => T { | |
if (handler.hasOwnProperty(action.type)) | |
return handler[action.type]({ | |
action, | |
state | |
}); | |
return state; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment