remove Record from HeaderProps and CellProps (#1601)

These definitions mask errors in the other definitions and there are better
ways of extending these.

See https://github.com/tannerlinsley/react-table/pull/1597 for an
example of an existing prototype that was missing but harder to find
because of these definitions.
This commit is contained in:
ggascoigne 2019-11-05 13:37:06 -08:00 committed by Tanner Linsley
parent 61f0ded1d9
commit 3b03ea32f5

5
index.d.ts vendored
View File

@ -159,12 +159,13 @@ export interface UseTableCellProps<D extends object> {
export type HeaderProps<D extends object> = TableInstance<D> & {
column: ColumnInstance<D>
} & Record<string, any>
}
export type CellProps<D extends object> = TableInstance<D> & {
column: ColumnInstance<D>
row: Row<D>
cell: Cell<D>
} & Record<string, any>
}
// NOTE: At least one of (id | accessor | Header as string) required
export interface Accessor<D extends object> {