import { ReactNode, ReactNodeArray, Context, Component, ComponentType, } from 'react' export declare type GetProps = C extends ComponentType ? P : never type DivProps = React.HTMLAttributes export interface KeepAliveProps { children: ReactNode | ReactNodeArray name?: string id?: string cacheKey?: string when?: boolean | Array | (() => boolean | Array) saveScrollPosition?: boolean | string autoFreeze?: boolean wrapperProps?: DivProps contentProps?: DivProps [key: string]: any } export declare class KeepAlive extends Component {} export default KeepAlive export declare class AliveScope extends Component<{ children: ReactNode | ReactNodeArray }> {} export declare class NodeKey extends Component<{ prefix?: string onHandleNode?: (node: any, mark?: string) => string | undefined | null }> {} export function fixContext(context: Context): void export function createContext( defaultValue: T, calculateChangedBits?: (prev: T, next: T) => number ): Context // type ContextFixEntry = [host: any, ...methods: any[]] export function autoFixContext(...configs: any[]): void export function useActivate(effect: () => void): void export function useUnactivate(effect: () => void): void export interface CachingNode { createTime: number updateTime: number name?: string id: string [key: string]: any } export interface KeeperDropConfig { delay: string refreshIfDropFailed: boolean } export interface AliveController { drop: (name: string | RegExp, config?: KeeperDropConfig) => Promise dropScope: ( name: string | RegExp, config?: KeeperDropConfig ) => Promise dropById: (id: string, config?: KeeperDropConfig) => Promise dropScopeByIds: (ids: string[], config?: KeeperDropConfig) => Promise refresh: (name: string | RegExp) => Promise refreshScope: (name: string | RegExp) => Promise refreshById: (id: string) => Promise refreshScopeByIds: (ids: string[]) => Promise clear: () => Promise getCachingNodes: () => Array } export function useAliveController(): AliveController export declare function withActivation>>( component: C ): C export declare function withAliveScope>>( component: C ): C