(target: unknown)
| 42 | } |
| 43 | |
| 44 | export function notifyReactiveStore(target: unknown): void { |
| 45 | const store = getReactiveStore(target) |
| 46 | if (!store) return |
| 47 | store.version++ |
| 48 | if (store.pending) return |
| 49 | store.pending = true |
| 50 | queueMicrotask(() => { |
| 51 | store.pending = false |
| 52 | // Notify a stable snapshot so re-subscriptions during render don't |
| 53 | // recursively extend this notification pass. |
| 54 | const subscribers = Array.from(store.subscribers) |
| 55 | subscribers.forEach((subscriber) => subscriber()) |
| 56 | }) |
| 57 | } |
| 58 | |
| 59 | export function clearReactiveStore(target: unknown): void { |
| 60 | const store = getReactiveStore(target) |
no test coverage detected