import { CSSProperties } from 'react'; // From: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-table declare module 'react-table' { export interface Hooks extends UseExpandedHooks, UseGroupByHooks, UseRowSelectHooks, UseTableHooks, UseSortByHooks {} export interface TableInstance extends UseColumnOrderInstanceProps, UseExpandedInstanceProps, UseFiltersInstanceProps, UseGlobalFiltersInstanceProps, UseGroupByInstanceProps, UsePaginationInstanceProps, UseRowSelectInstanceProps, UseRowStateInstanceProps, UseSortByInstanceProps {} export function useTable( options: TableOptions, ...plugins: Array> ): TableInstance; export interface TableState extends UseColumnOrderState, UseExpandedState, UseFiltersState, UseGlobalFiltersState, UseGroupByState, UsePaginationState, UseResizeColumnsState, UseRowSelectState, UseRowStateState, UseSortByState {} export interface Cell extends UseGroupByCellProps, UseRowStateCellProps {} export interface Row extends UseExpandedRowProps, UseGroupByRowProps, UseRowSelectRowProps, UseRowStateRowProps {} export interface ColumnInterface extends UseFiltersColumnOptions, UseGlobalFiltersColumnOptions, UseGroupByColumnOptions, UseResizeColumnsColumnOptions, UseSortByColumnOptions, UseTableColumnOptions {} // CoreUIColumn export type CoreUIColumn = Column & { cellStyle?: CSSProperties; }; export interface ColumnInstance extends UseFiltersColumnProps, UseGroupByColumnProps, UseResizeColumnsColumnProps, UseSortByColumnProps { cellStyle?: CSSProperties; } export interface CoreUIUseTableOptions extends UseTableOptions { columns: ReadonlyArray>; } export interface TableOptions extends UseExpandedOptions, UseFiltersOptions, UseGlobalFiltersOptions, UseGroupByOptions, UsePaginationOptions, UseResizeColumnsOptions, UseRowSelectOptions, UseRowStateOptions, UseSortByOptions, CoreUIUseTableOptions, // note that having Record here allows you to add anything to the options, this matches the spirit of the // underlying js library, but might be cleaner if it's replaced by a more specific type that matches your // feature set, this is a safe default. Record {} }