UNPKG

@tjoskar/react-lazyload-img

Version:
9 lines (8 loc) 632 B
import { Props } from './types'; export declare const call: (fn: any) => any; export declare const isNull: <T>(obj: T | null) => obj is null; export declare function setImage(element: HTMLImageElement | HTMLDivElement, imagePath: string): void; export declare function loadImage(imagePath: string): Promise<string>; export declare function isImageElement(element: HTMLImageElement | HTMLDivElement): element is HTMLImageElement; export declare function addCssClassName(element: HTMLImageElement | HTMLDivElement, cssClassName: string): void; export declare function registerImageToLazyLoad(element: Element, metadata: Props): void;