DefinitelyTyped/types/react-lazyload/index.d.ts
Robin van Wijngaarden 7c2c4a1a3f [react-lazyload] Updated types (#39002)
* Updated types for @types/react-lazyload

The prop `preventLoading` was introduced [here](https://github.com/twobin/react-lazyload/pull/243) and can be found back in `master` and the README of twobin/react-lazyload:
https://github.com/twobin/react-lazyload#preventloading

* Synchronize order of props with PropTypes from src

* Bump version

Exclude patch version
2019-10-14 16:35:02 -07:00

33 lines
949 B
TypeScript

// Type definitions for react-lazyload ver 2.6
// Project: https://github.com/jasonslyvia/react-lazyload
// Definitions by: m0a <https://github.com/m0a>
// svobik7 <https://github.com/svobik7>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Component, ReactNode } from "react";
export interface LazyLoadProps {
once?: boolean;
height?: number | string;
offset?: number | number[];
overflow?: boolean;
resize?: boolean;
scroll?: boolean;
children?: ReactNode;
throttle?: number | boolean;
debounce?: number | boolean;
placeholder?: ReactNode;
scrollContainer?: string | Element;
unmountIfInvisible?: boolean;
preventLoading?: boolean;
}
export default class LazyLoad extends Component<LazyLoadProps> {
constructor(props: LazyLoad);
}
export function lazyload(option: {}): LazyLoad;
export function forceCheck(): void;