import type { StalierOptions, StalierResult } from './stalier.types'; /** * stale while revalidate function * @example * const { data, status } = await withStaleWhileRevalidate(fn, { * maxAge: 1, * staleWhileRevalidate: 999, * cacheKey: 'cacheKey', * cacheProvider: redisClient, * }); * @param fn - function to cache result from * @param options - options for stale while revalidate * @returns result of fn either from cache or from fn * @throws error only if fn throws error */ export declare function withStaleWhileRevalidate(fn: () => Promise, options: StalierOptions): Promise>;