import { FormInstance } from 'antd/es/form'; interface LocalCacheOptions { serializer?: (value: any) => string; deserializer?: (value: string) => any; expires?: number; } interface ServerCacheOptions { serviceToSet: (values: any) => Promise; serviceToGet: () => Promise; } interface CommonProps { form: FormInstance; interval?: number; defaultValue?: any | (() => any); manual?: boolean; localCacheOptions?: LocalCacheOptions; canSetCacheWhenPageHide?: boolean; canSetCacheWhenUnmount?: boolean; localCacheName?: string; serverCacheOptions?: ServerCacheOptions; } interface LocalProps extends CommonProps { cacheType: 'local'; } interface ServerProps extends CommonProps { cacheType: 'server'; serverCacheOptions: ServerCacheOptions; } interface CommonResultProps { data: any; setCache: (value?: any) => void; startCache: () => void; stopCache: () => void; } interface LocalResultProps extends CommonResultProps { clearCache: () => void; } interface ServerResultProps extends CommonResultProps { loading: boolean; refresh: () => void; loadingSet: boolean; } declare function useCacheForm(props: LocalProps): LocalResultProps; declare function useCacheForm(props: ServerProps): ServerResultProps; export default useCacheForm;