mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Trying to avoid forbidden-type Function
This commit is contained in:
Vendored
+3
-3
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-paginate v4.2
|
||||
// Type definitions for react-paginate 4.2
|
||||
// Project: https://github.com/AdeleD/react-paginate
|
||||
// Definitions by: Simon Hartcher <https://github.com/deevus>, Wouter Hardeman <https://github.com/wouterhardeman>, pegel03 <https://github.com/pegel03>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -45,7 +45,7 @@ interface ReactPaginateProps {
|
||||
/**
|
||||
* The method to call when a page is clicked. Exposes the current page object as an argument.
|
||||
*/
|
||||
onPageChange?: Function;
|
||||
onPageChange?: (selectedItem: {selected: number}) => void;
|
||||
|
||||
/**
|
||||
* The initial page selected.
|
||||
@@ -110,7 +110,7 @@ interface ReactPaginateProps {
|
||||
/**
|
||||
* The method is called to generate the href attribute value on tag a of each page element.
|
||||
*/
|
||||
hrefBuilder?: Function;
|
||||
hrefBuilder?: (pageIndex: number) => void;
|
||||
}
|
||||
|
||||
declare const ReactPaginate: React.ComponentClass<ReactPaginateProps>;
|
||||
|
||||
@@ -3,8 +3,6 @@ import ReactPaginate = require("react-paginate");
|
||||
|
||||
class Test extends React.Component<{}, {}> {
|
||||
|
||||
public onClick: Function;
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ReactPaginate
|
||||
@@ -15,7 +13,7 @@ class Test extends React.Component<{}, {}> {
|
||||
nextLabel={'next'}
|
||||
breakLabel={'break-me'}
|
||||
breakClassName={'break-class'}
|
||||
onPageChange={this.onClick}
|
||||
onPageChange={(selectedItem: {selected: number}) => null}
|
||||
initialPage={2}
|
||||
forcePage={3}
|
||||
disableInitialCallback={false}
|
||||
@@ -28,7 +26,7 @@ class Test extends React.Component<{}, {}> {
|
||||
previousLinkClassName={'previous-a'}
|
||||
nextLinkClassName={'next-a'}
|
||||
disabledClassName={'disabled'}
|
||||
hrefBuilder={this.onClick}
|
||||
hrefBuilder={(pageIndex: number) => null}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user