Fix lint errors

This commit is contained in:
Stephanie Roy 2018-06-05 16:09:50 -04:00
parent 060d851706
commit 4e43709c96
4 changed files with 12 additions and 12 deletions

View File

@ -4,9 +4,9 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/// <reference types="react" />
import * as React from 'react';
declare module InfiniteScroll {
declare namespace InfiniteScroll {
interface InfiniteScrollProps {
/**
* Set the length of the data.This will unlock the subsequent calls to next.
@ -28,7 +28,7 @@ declare module InfiniteScroll {
/**
* This message is shown to the user when he has seen all the records which means he's at the bottom and hasMore is false
*/
endMessage: React.ReactNode
endMessage: React.ReactNode;
/**
* You can send a loader component to show while the component waits for the next load of data. e.g. <h3>Loading...</h3> or any fancy loader element
@ -99,9 +99,5 @@ declare module InfiniteScroll {
}
}
declare class InfiniteScroll extends React.Component<InfiniteScrollProps, any> {}
declare module 'react-infinite-scroll-component' {
export = InfiniteScroll;
export as namespace InfiniteScroll;
}
declare class InfiniteScroll extends React.Component<InfiniteScroll.InfiniteScrollProps, any> {}
export = InfiniteScroll;

View File

@ -1,3 +1,4 @@
import * as React from 'react';
import * as InfiniteScroll from 'react-infinite-scroll-component';
const options: JSX.Element[] = [
@ -8,7 +9,8 @@ const options: JSX.Element[] = [
const props: InfiniteScroll.InfiniteScrollProps = {
dataLength: 4,
hasMore: true,
endMessage: 'The end.'
endMessage: 'The end.',
next: () => null,
};
<InfiniteScroll {...props}>{options}</InfiniteScroll>
<InfiniteScroll {...props}>{options}</InfiniteScroll>;

View File

@ -7,6 +7,8 @@
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"jsx": "react",
"baseUrl": "../",
"typeRoots": [
"../"

View File

@ -66,4 +66,4 @@ declare namespace InfiniteScroll {
namespace InfiniteScroll {}
}
export = InfiniteScroll.InfiniteScroll;
export = InfiniteScroll;