(
state: RouterMemoryState,
action: {
type: 'push';
payload: RouterMemoryState;
},
)
| 15 | type RouterMemoryState = Omit<UseRouterMemory, 'push'>; |
| 16 | |
| 17 | const routerMemoryReducer = ( |
| 18 | state: RouterMemoryState, |
| 19 | action: { |
| 20 | type: 'push'; |
| 21 | payload: RouterMemoryState; |
| 22 | }, |
| 23 | ): RouterMemoryState => { |
| 24 | if (action.type === 'push') { |
| 25 | return action.payload; |
| 26 | } |
| 27 | |
| 28 | return state; |
| 29 | }; |
| 30 | |
| 31 | const createRouterInitialState = (): RouterMemoryState => { |
| 32 | return { |
nothing calls this directly
no outgoing calls
no test coverage detected