Skip to content

Commit aea1dc5

Browse files
committed
Annotae Grid and List return types explicitly to avoid redundant inlined inferred types
1 parent b2fe9ed commit aea1dc5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/components/grid/Grid.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
useImperativeHandle,
66
useMemo,
77
useState,
8+
type JSX,
89
type ReactNode
910
} from "react";
1011
import { useIsRtl } from "../../core/useIsRtl";
@@ -36,7 +37,7 @@ export function Grid<
3637
style,
3738
tagName = "div" as TagName,
3839
...rest
39-
}: GridProps<CellProps, TagName>) {
40+
}: GridProps<CellProps, TagName>): JSX.Element {
4041
const cellProps = useMemoizedObject(cellPropsUnstable);
4142
const CellComponent = useMemo(
4243
() => memo(CellComponentProp, arePropsEqual),

lib/components/list/List.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
useImperativeHandle,
66
useMemo,
77
useState,
8+
type JSX,
89
type ReactNode
910
} from "react";
1011
import { useVirtualizer } from "../../core/useVirtualizer";
@@ -35,7 +36,7 @@ export function List<
3536
tagName = "div" as TagName,
3637
style,
3738
...rest
38-
}: ListProps<RowProps, TagName>) {
39+
}: ListProps<RowProps, TagName>): JSX.Element {
3940
const rowProps = useMemoizedObject(rowPropsUnstable);
4041
const RowComponent = useMemo(
4142
() => memo(RowComponentProp, arePropsEqual),

0 commit comments

Comments
 (0)