| 91 | type MyAction1 = MultiplyAction | DivideAction |
| 92 | |
| 93 | const reducer0: Reducer<State, MyAction0> = (state = 0, action) => { |
| 94 | if (action.type === 'INCREMENT') { |
| 95 | // Action shape is determined by `type` discriminator. |
| 96 | // @ts-expect-error |
| 97 | action.wrongField |
| 98 | |
| 99 | const { count = 1 } = action |
| 100 | |
| 101 | return state + count |
| 102 | } |
| 103 | |
| 104 | if (action.type === 'DECREMENT') { |
| 105 | // @ts-expect-error |
| 106 | action.wrongField |
| 107 | |
| 108 | const { count = 1 } = action |
| 109 | |
| 110 | return state - count |
| 111 | } |
| 112 | |
| 113 | return state |
| 114 | } |
| 115 | |
| 116 | const reducer1: Reducer<State, MyAction1> = (state = 0, action) => { |
| 117 | if (action.type === 'MULTIPLY') { |