Skip to content

Commit

Permalink
refactor(releases): default table data type of unknown; rename of som…
Browse files Browse the repository at this point in the history
…e variables; improved types for TableProvider
  • Loading branch information
jordanl17 committed Jul 18, 2024
1 parent dfc3798 commit 20578fb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions packages/sanity/src/core/releases/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export interface TableProps<TableData, AdditionalRowTableData> {
datum,
}: {
datum: RowDatum<TableData, AdditionalRowTableData> | unknown
// datum: TableData extends unknown
// RowDatum<TableData, AdditionalRowTableData>
// : DefaultTableData
}) => JSX.Element
}

Expand Down
4 changes: 1 addition & 3 deletions packages/sanity/src/core/releases/components/Table/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ export interface InjectedTableProps {
style: {width?: number}
}

export type DefaultTableData = unknown

export interface Column<TableData = DefaultTableData> {
export interface Column<TableData = unknown> {
header: (props: HeaderProps) => JSX.Element
cell: (props: {
datum: TableData
Expand Down

0 comments on commit 20578fb

Please sign in to comment.