(updater: (draftState: State) => void)
| 46 | } |
| 47 | |
| 48 | export function updateState(updater: (draftState: State) => void): void { |
| 49 | const prevState = state; |
| 50 | state = produce(state, updater); |
| 51 | subscribers.forEach((callback) => callback(prevState)); |
| 52 | } |
| 53 | |
| 54 | export function getState(): DeepReadonly<State> { |
| 55 | return state; |
no outgoing calls
no test coverage detected