import type { Writable } from "svelte/store"; /** * Wrap a writable store's `update` so multiple synchronous calls made within * the same microtask collapse into a single flush, instead of notifying * subscribers once per call. `flush` applies pending updates immediately. */ export function batchStoreUpdates( store: Writable, ): ((callback: (value: T) => T) => void) & { flush: () => void };