( state: Types.ReleaseState, action: Types.ReleaseAction )
| 30 | }); |
| 31 | |
| 32 | const reducer = ( |
| 33 | state: Types.ReleaseState, |
| 34 | action: Types.ReleaseAction |
| 35 | ): Types.ReleaseState => { |
| 36 | switch (action.type) { |
| 37 | case 'SET_VERSION': |
| 38 | return { ...state, version: action.payload }; |
| 39 | case 'SET_OS': |
| 40 | return { ...state, os: action.payload }; |
| 41 | case 'SET_PLATFORM': |
| 42 | return { ...state, platform: action.payload }; |
| 43 | case 'SET_INSTALL_METHOD': |
| 44 | return { ...state, installMethod: action.payload }; |
| 45 | case 'SET_MANAGER': |
| 46 | return { ...state, packageManager: action.payload }; |
| 47 | default: |
| 48 | return state; |
| 49 | } |
| 50 | }; |
| 51 | |
| 52 | export default reducer; |
no outgoing calls
no test coverage detected