// XXX: This needs follow typedef of react-table, // So ban-types are required to be used in this file /* eslint-disable @typescript-eslint/ban-types */ import { UseExpandedInstanceProps, UseExpandedOptions, UseExpandedRowProps, UseExpandedState, UseFiltersColumnOptions, UseFiltersColumnProps, UseFiltersInstanceProps, UseFiltersOptions, UseFiltersState, UseRowSelectHooks, UseRowSelectInstanceProps, UseSortByColumnOptions, UseSortByColumnProps, UseSortByHooks, UseSortByInstanceProps, UseSortByOptions, UseSortByState, UseRowSelectState, Accessor, IdType, } from 'react-table'; import { Breakpoint } from '../../utils/responsiveBreakpoints'; declare module 'react-table' { export interface Hooks extends UseSortByHooks, UseRowSelectHooks {} export interface TableInstance extends UseSortByInstanceProps, UseRowSelectInstanceProps, UseExpandedInstanceProps, UseFiltersInstanceProps {} export interface ColumnInterface extends UseSortByColumnOptions, UseFiltersColumnOptions { displayAtBreakpoint?: Breakpoint; } export interface ColumnInstance extends UseSortByColumnProps, UseFiltersColumnProps { accessor?: keyof D extends never ? IdType | Accessor : Accessor; align?: 'left' | 'right'; width?: string; } export interface Row extends UseRowSelectRowProps, UseExpandedRowProps {} export interface TableOptionsCustomProps { customRowExpandable: (rowData: D) => boolean; } export interface TableOptions extends TableOptionsCustomProps, UseSortByOptions, UseExpandedOptions, UseFiltersOptions {} export interface TableState extends UseExpandedState, UseRowSelectState, UseSortByState, UseFiltersState {} }