Skip to content

Commit

Permalink
Fix type extension
Browse files Browse the repository at this point in the history
```
node_modules/rsuite-table/lib/HeaderCell.d.ts:4:18 - error TS2430: Interface 'HeaderCellProps' incorrectly extends interface 'InnerCellProps'.
  Types of property 'onResize' are incompatible.
    Type '((columnWidth?: number | undefined, dataKey?: string | undefined) => void) | undefined' is not assignable to type 'ReactEventHandler<HTMLElement> | undefined'.
      Type '(columnWidth?: number | undefined, dataKey?: string | undefined) => void' is not assignable to type 'ReactEventHandler<HTMLElement>'.
        Types of parameters 'columnWidth' and 'event' are incompatible.
          Type 'SyntheticEvent<HTMLElement, Event>' is not assignable to type 'number'.

4 export interface HeaderCellProps extends InnerCellProps {
                   ~~~~~~~~~~~~~~~
```
  • Loading branch information
b1rdex authored Jul 25, 2023
1 parent 664d028 commit fd8218f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ColumnResizeHandler, { FixedType } from './ColumnResizeHandler';
import { useUpdateEffect, useClassNames } from './utils';
import Cell, { InnerCellProps } from './Cell';

export interface HeaderCellProps extends InnerCellProps {
export interface HeaderCellProps extends Omit<InnerCellProps, 'onResize'> {
index?: number;
minWidth?: number;
sortColumn?: string;
Expand Down

0 comments on commit fd8218f

Please sign in to comment.