DefinitelyTyped/types/react-lazyload/index.d.ts
Jirka Svoboda 08d42b9d98 [twobin/react-lazyload] new scrollContainer prop (#34976)
* [twobin/react-lazyload] added `scrollContainer`

Added new prop type according to source lib v2.5 docs:

https://github.com/twobin/react-lazyload#scrollcontainer

* Added own signature
2019-04-30 10:14:51 -07:00

32 lines
919 B
TypeScript

// Type definitions for react-lazyload ver 2.5
// 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;
unmountIfInvisible?: boolean;
scrollContainer?: string | Element;
}
export default class LazyLoad extends Component<LazyLoadProps> {
constructor(props: LazyLoad);
}
export function lazyload(option: {}): LazyLoad;
export function forceCheck(): void;