File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments