import { UseAsyncStateOptions, UseAsyncStateReturn } from '../useAsyncState/index.js'; import { MaybeAccessor } from '@solidjs-use/shared'; import 'solid-js'; interface UseImageOptions { /** Address of the resource */ src: string; /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */ srcset?: string; /** Image sizes for different page layouts */ sizes?: string; /** Image alternative information */ alt?: string; /** Image classes */ class?: string; /** Image loading */ loading?: HTMLImageElement['loading']; /** Image CORS settings */ crossorigin?: string; /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */ referrerPolicy?: HTMLImageElement['referrerPolicy']; } /** * Reactive load an image in the browser, you can wait the result to display it or show a fallback. * * @see https://solidjs-use.github.io/solidjs-use/core/useImage * @param options Image attributes, as used in the tag */ declare const useImage: (options: MaybeAccessor, asyncStateOptions?: UseAsyncStateOptions) => UseAsyncStateReturn; type UseImageReturn = ReturnType; export { UseImageOptions, UseImageReturn, useImage };