UNPKG

router-primitives

Version:

A cross-platform application router. Declarative routing by way of layout primitives

18 lines (17 loc) 836 B
import { IRouterCache } from './types/router_cache'; import { RouterCurrentState } from './types'; export default class DefaultRouterCacheStore<CustomState> implements IRouterCache<unknown> { cache: Record<string, RouterCurrentState<CustomState>>; transactionCache: Record<string, RouterCurrentState<CustomState>>; isTransactionRunning: boolean; constructor(); startTransaction: () => void; saveTransaction: () => void; discardTransaction: () => void; wasVisible(routerName: string): boolean | undefined; previousData(routerName: string): CustomState | undefined; removeCache(routerName: string): void; setCache(routerName: string, cache: RouterCurrentState<CustomState>): void; get serializedCache(): string; setCacheFromSerialized(serializedCache: string): void; }