import { Resolver } from '@shopify/async'; import { IfAllOptionalKeys } from '@shopify/useful-types'; import { AssetTiming, AsyncComponentType } from './types'; export declare function usePreload(...args: IfAllOptionalKeys, PreloadOptions?], [AsyncComponentType, PreloadOptions]>): ReturnType; export declare function usePrefetch(...args: IfAllOptionalKeys, PrefetchOptions?], [AsyncComponentType, PrefetchOptions]>): ReturnType; export declare function useKeepFresh(...args: IfAllOptionalKeys, KeepFreshOptions?], [AsyncComponentType, KeepFreshOptions]>): ReturnType; interface Options { immediate?: boolean; assets?: AssetTiming; styles?: AssetTiming; scripts?: AssetTiming; } export declare function useAsync(resolver: Resolver, { assets, scripts, styles, immediate }?: Options): { id: string | undefined; resolved: null; error: Error; loading: boolean; load: () => Promise; } | { id: string | undefined; resolved: T | null; error: null; loading: boolean; load: () => Promise; }; export declare function useAsyncAsset(id?: string, { scripts, styles }?: { styles?: AssetTiming; scripts?: AssetTiming; }): void; export {};