UNPKG

@eviljs/reactx

Version:
13 lines (12 loc) 578 B
import type { Task } from '@eviljs/std/fn-type'; export declare function ImageLoader(props: ImageLoaderProps): undefined; export declare function imageIdOf(imageUrl: string): string; export declare function createImageLoader(imageUrl: string, onEndObserver?: ImageOnEnd): HTMLImageElement; export declare function mountImageLoader(img: HTMLImageElement): Task; export declare function unmountImageLoader(img: HTMLImageElement): void; export interface ImageLoaderProps { items: Array<string>; } export interface ImageOnEnd { (url: string, img: HTMLImageElement): void; }