Skip to content

Commit 80708b1

Browse files
committed
fix: changed cursor interface
1 parent cd14ea1 commit 80708b1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/interfaces/Cursor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const start = undefined;
22

3-
type Cursor = string | typeof start;
3+
type Cursor = string | typeof start | null;
44

55
export default Cursor;

src/interfaces/PaginatedResponse.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import Cursor from './Cursor';
12
import Item from './Item';
23

34
export interface PaginationMetadata {
45
readonly hasAfter: boolean;
56
readonly hasBefore: boolean;
6-
readonly after: string | null;
7-
readonly before: string | null;
7+
readonly after: Cursor;
8+
readonly before: Cursor;
89
readonly totalCount: number;
910
}
1011
export default interface PaginatedResponse<I extends Item> {

0 commit comments

Comments
 (0)