From 04091fcdb31a32d6c04ffb0b28337ee37c2f36a4 Mon Sep 17 00:00:00 2001 From: jingzouzou <827088092@qq.com> Date: Fri, 8 Nov 2024 00:22:30 +0800 Subject: [PATCH] fix: tsc check error --- src/Cell/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Cell/index.tsx b/src/Cell/index.tsx index cf148cb4..e7cde3c7 100644 --- a/src/Cell/index.tsx +++ b/src/Cell/index.tsx @@ -23,7 +23,7 @@ export interface CellProps { /** `column` index is the real show rowIndex */ index?: number; /** the column index which cell in */ - colIndex: number; + colIndex?: number; /** the index of the record. For the render(value, record, renderIndex) */ renderIndex?: number; dataIndex?: DataIndex; @@ -55,7 +55,6 @@ export interface CellProps { rowType?: 'header' | 'body' | 'footer'; isSticky?: boolean; - setRef?: React.Ref; } const getTitleFromCellRenderChildren = ({ @@ -280,4 +279,6 @@ function Cell( ); } -export default React.memo(React.forwardRef(Cell)); +export default React.memo(React.forwardRef(Cell)) as ( + props: CellProps & { ref?: React.ForwardedRef }, +) => React.JSX.Element;