import type { Resolver } from '@shopify/async'; import type { IfAllOptionalKeys, NoInfer } from '@shopify/useful-types'; import type { AssetTiming, AsyncComponentType } from './types'; export type Preloadable = Pick, 'usePreload'>; export type Prefetchable = Pick, 'usePrefetch'>; export type KeepFreshable = Pick, 'useKeepFresh'>; export declare function usePreload(...args: IfAllOptionalKeys, PreloadOptions? ], [ Preloadable, NoInfer ]>): ReturnType<(typeof args)[0]['usePreload']>; export declare function usePrefetch(...args: IfAllOptionalKeys, PrefetchOptions? ], [ Prefetchable, NoInfer ]>): ReturnType<(typeof args)[0]['usePrefetch']>; export declare function useKeepFresh(...args: IfAllOptionalKeys, KeepFreshOptions? ], [ KeepFreshable, NoInfer ]>): ReturnType<(typeof args)[0]['useKeepFresh']>; 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 {}; //# sourceMappingURL=hooks.d.ts.map