mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
* Add type definitions for `react-lazyload` package. * fix lint error. * fix TypeScript Version
27 lines
751 B
TypeScript
27 lines
751 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.1
|
|
|
|
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;
|