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