mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Support Partial<> on setState now that TS 2.1 is out * Update readme to reflect setState being typed correctly * Switch setState to Pick * Restore cloneELement portion of readme * Use Pick<> | S for setState due to cast issue * state and props should be readonly * Fix nit + document why we * Add typescript compiler header * Update to properly order headers * Update readme to reflect 2.1.5 fixing stPick * Update readme now that 2.1.5 is out * All that depend on react now require 2.1 * Fix definition that fails due to readonly state
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
// Type definitions for react-infinite
|
|
// Project: https://github.com/seatgeek/react-infinite
|
|
// Definitions by: rhysd <https://github.com/rhysd>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.1
|
|
|
|
///<reference types="react" />
|
|
|
|
import * as React from "react";
|
|
|
|
import Infinite = ReactInfinite.Infinite;
|
|
export = Infinite;
|
|
|
|
declare namespace ReactInfinite {
|
|
interface InfiniteProps extends React.Props<Infinite> {
|
|
elementHeight: number | number[];
|
|
containerHeight?: number;
|
|
preloadBatchSize?: number | Object;
|
|
preloadAdditionalHeight?: number | Object;
|
|
handleScroll?: (node: React.ReactElement<any>) => void;
|
|
infiniteLoadBeginBottomOffset?: number;
|
|
infiniteLoadBeginEdgeOffset?: number;
|
|
onInfiniteLoad?: () => void;
|
|
loadingSpinnerDelegate?: React.ReactElement<any>;
|
|
isInfiniteLoading?: boolean;
|
|
timeScrollStateLastsForAfterUserScrolls?: number;
|
|
className?: string;
|
|
useWindowAsScrollContainer?: boolean;
|
|
displayBottomUpwards?: boolean;
|
|
}
|
|
|
|
export class Infinite extends React.Component<InfiniteProps, {}> {
|
|
static containerHeightScaleFactor(n: number): any;
|
|
}
|
|
}
|