UNPKG

elf-sync-state-yomo

Version:
11 lines (10 loc) 462 B
import { Store, StoreValue } from '@ngneat/elf'; import { Observable } from 'rxjs'; interface Options<S extends Store> { channel?: string; source?: (store: S) => Observable<Partial<StoreValue<S>>>; preUpdate?: (event: MessageEvent<Partial<StoreValue<S>>>) => Partial<StoreValue<S>>; runGuard?: () => boolean; } export declare function syncState<S extends Store>(store: S, options?: Options<S>): BroadcastChannel | undefined; export {};