/// /// import * as React from 'react' import { SwitchProps, RouteProps } from 'react-router-dom' export interface CacheRouteProps extends RouteProps { className?: string when?: 'forward' | 'back' | 'always' | ((props: CacheRouteProps) => boolean) behavior?: (isCached: boolean) => object | void cacheKey?: string | ((props: CacheRouteProps) => string), unmount?: boolean saveScrollPosition?: boolean multiple?: boolean | number autoFreeze?: boolean } export declare class CacheRoute extends React.Component {} export default CacheRoute export interface CacheSwitchProps extends SwitchProps { which?: (element: React.ElementType) => boolean autoFreeze?: boolean } export declare class CacheSwitch extends React.Component {} export function dropByCacheKey(cacheKey: string): void export function refreshByCacheKey(cacheKey: string): void export function getCachingKeys(): Array export function clearCache(): void export interface CachingComponent extends React.ComponentClass { __cacheCreateTime: number __cacheUpdateTime: number } export interface CachingComponentMap { [key: string]: CachingComponent } export function getCachingComponents(): CachingComponentMap export function useDidCache(effect: () => void, deps?: any[]): void export function useDidRecover(effect: () => void, deps?: any[]): void