From fcb44e29e3087eb70c591c7559065d18827a4c77 Mon Sep 17 00:00:00 2001 From: Nick Z Date: Tue, 22 Aug 2023 13:10:25 +0300 Subject: [PATCH] fix(types/pagination) Add the declarations for the functions added to the "state and getters" object in the following lines https://github.com/table-library/react-table-library/blob/3b0ddab82cf7c633731087ba9534020ec9099db2/src/pagination/usePagination.ts#L136C1-L141C5 // src/pagination/usePagination.ts const stateAndGetters = { ...state, getTotalPages, getPages, getPageBoundaries, }; --- src/types/pagination.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/types/pagination.ts b/src/types/pagination.ts index 71ea7c6..9bf25c1 100644 --- a/src/types/pagination.ts +++ b/src/types/pagination.ts @@ -13,7 +13,11 @@ export type PaginationFunctions = { }; export type Pagination = { - state: State; + state: State & { + getTotalPages: (nodes: Array) => number; + getPages: (nodes: Array) => Array; + getPageBoundaries: (nodes: Array) => { start: number; end: number }; + }; fns: PaginationFunctions; options: PaginationOptionsSound; modifier: Modifier;