Skip to content

Commit

Permalink
Properly fix return types of pagination handlers. (#1364)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeppahBaws authored Oct 2, 2024
1 parent 0c011a8 commit 4d5552a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-bottles-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'houdini-svelte': patch
---

Properly fix return types for pagination handlers
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class QueryStoreCursor<

async loadPreviousPage(
args?: Parameters<Required<CursorHandlers<_Data, _Input>>['loadPreviousPage']>[0]
): Promise<ReturnType<CursorHandlers<_Data, _Input>['loadPreviousPage']>> {
): Promise<QueryResult<_Data, _Input>> {
const handlers = await this.#handlers()
try {
return await handlers.loadPreviousPage(args)
Expand All @@ -103,7 +103,7 @@ export class QueryStoreCursor<

async loadNextPage(
args?: Parameters<CursorHandlers<_Data, _Input>['loadNextPage']>[0]
): Promise<ReturnType<CursorHandlers<_Data, _Input>['loadNextPage']>> {
): Promise<QueryResult<_Data, _Input>> {
const handlers = await this.#handlers()
try {
return await handlers.loadNextPage(args)
Expand Down

0 comments on commit 4d5552a

Please sign in to comment.