Fix types

This commit is contained in:
Dan Abramov
2023-12-23 19:40:26 +00:00
parent 0f2f890fee
commit 4764a56e78
+1 -1
View File
@@ -22,7 +22,7 @@ export function useScrollHandlers(): ScrollHandlers {
return useContext(ScrollContext)
}
type ProviderProps = {children: React.ReactNode} & ScrollHandlers
type ProviderProps = {children: React.ReactNode} & Partial<ScrollHandlers>
// Note: this completely *overrides* the parent handlers.
// It's up to you to compose them with the parent ones via useScrollHandlers() if needed.