mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [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
32 lines
919 B
TypeScript
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;
|