(action: Action)
| 145 | let memoryState: State = { toasts: [] }; |
| 146 | |
| 147 | function dispatch(action: Action) { |
| 148 | memoryState = reducer(memoryState, action); |
| 149 | for (const listener of listeners) { |
| 150 | listener(memoryState); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | type Toast = Omit<ToasterToast, "id"> & { id?: string }; |
| 155 |