summaryrefslogtreecommitdiff
path: root/src/custom.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/custom.d.ts')
-rw-r--r--src/custom.d.ts44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/custom.d.ts b/src/custom.d.ts
index 3a9b7ac..9aa0b72 100644
--- a/src/custom.d.ts
+++ b/src/custom.d.ts
@@ -20,3 +20,47 @@ declare const process = {
PUBLIC_URL: string,
},
};
+
+declare module 'react-table' {
+ interface TableOptions {}
+
+ interface Empty {}
+
+ interface SortByToggleProps {}
+
+ interface Header {
+ getHeaderProps(p: SortByToggleProps): { role?: string };
+ getSortByToggleProps(): SortByToggleProps;
+ render(x: string): string;
+ isSorted: boolean;
+ isSortedDesc: boolean;
+ }
+
+ interface HeaderGroup {
+ getHeaderGroupProps(): { role?: string };
+ headers: Header[];
+ }
+
+ interface Cell {
+ getCellProps(): { role?: string };
+
+ column: { id: string };
+ value: number;
+ }
+
+ interface Row {
+ cells: Cell[];
+ }
+
+ export function useTable(
+ options: TableOptions,
+ useSortBy: useSortBy
+ ): {
+ headerGroups: HeaderGroup[];
+ getTableProps(): { role?: string };
+ rows: Row[];
+ prepareRow(r: Row): void;
+ };
+
+ export function useSortBy(): Empty;
+}