Skip to content

Commit 16280ee

Browse files
committed
fix: Appease TS?
1 parent 9d18bb0 commit 16280ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react/utils/src/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const Item = (props: any) => {
1616
: props.children;
1717
};
1818

19-
export function Show<T = boolean>(props: ShowProps<T>): ReactNode | null {
19+
export function Show<T = boolean>(props: ShowProps<T>): JSX.Element | null {
2020
useSignals();
2121
const value =
2222
typeof props.when === "function" ? props.when() : props.when.value;
23-
if (!value) return props.fallback || null;
23+
if (!value) return (props.fallback as JSX.Element) || null;
2424
return <Item v={value} children={props.children} />;
2525
}
2626

@@ -33,7 +33,7 @@ interface ForProps<T> {
3333
children: (value: T, index: number) => ReactNode;
3434
}
3535

36-
export function For<T>(props: ForProps<T>): ReactNode | null {
36+
export function For<T>(props: ForProps<T>): JSX.Element | null {
3737
useSignals();
3838
const cache = useMemo(() => new Map(), []);
3939
let list = (
@@ -42,7 +42,7 @@ export function For<T>(props: ForProps<T>): ReactNode | null {
4242
>
4343
).value;
4444

45-
if (!list.length) return props.fallback || null;
45+
if (!list.length) return (props.fallback as JSX.Element) || null;
4646

4747
const removed = new Set(cache.keys());
4848

0 commit comments

Comments
 (0)