Files
DefinitelyTyped/types/react-lazyload/index.d.ts
myxvisual 9cb211daaa Add forceCheck for react-lazyload
forceCheck is available to manually trigger checking for elements in viewport. Helpful when LazyLoad components enter the viewport without resize or scroll events, e.g. when the components' container was hidden then become visible.
2017-06-26 13:06:41 +08:00

29 lines
784 B
TypeScript

// Type definitions for react-lazyload ver 2.2
// Project: https://github.com/jasonslyvia/react-lazyload
// Definitions by: m0a <https://github.com/m0a>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import {Component} from 'react';
export interface LazyLoadProps {
once?: boolean;
height?: number | string;
offset?: number | string;
overflow?: boolean;
scroll?: boolean;
children?: JSX.Element;
throttle?: number | boolean;
debounce?: number | boolean;
placeholder?: Node;
unmountIfInvisible?: boolean;
}
export default class LazyLoad extends Component<LazyLoadProps> {
constructor(props: LazyLoad);
}
export function lazyload(option: {}): LazyLoad;
export function forceCheck(): void;