From bc8ed0a9ec2d885fdf9f84c48820252b27e8d20f Mon Sep 17 00:00:00 2001 From: Spencer Whitehead Date: Tue, 8 Oct 2024 21:24:41 -0400 Subject: [PATCH] fix types --- packages/virtual/src/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/virtual/src/index.tsx b/packages/virtual/src/index.tsx index 18922e46c..aac9bdcc4 100644 --- a/packages/virtual/src/index.tsx +++ b/packages/virtual/src/index.tsx @@ -15,7 +15,7 @@ type VirtualListReturn = [ { containerHeight: Accessor; viewerTop: Accessor; - visibleItems: Accessor; + visibleItems: Accessor; }, onScroll: ( e: Event & { @@ -58,7 +58,7 @@ export function createVirtualList({ { containerHeight: () => items.length * rowHeight, viewerTop: () => getFirstIdx() * rowHeight, - visibleItems: () => items.slice(getFirstIdx(), getLastIdx()), + visibleItems: () => items.slice(getFirstIdx(), getLastIdx()) as unknown as T, }, e => { setOffset(e.target.scrollTop); @@ -117,7 +117,7 @@ export function VirtualList( top: `${viewerTop()}px`, }} > - + {props.children}