diff --git a/.changes/next-release/bugfix-Paginator-887637f3.json b/.changes/next-release/bugfix-Paginator-887637f3.json new file mode 100644 index 0000000000..2ec92164d3 --- /dev/null +++ b/.changes/next-release/bugfix-Paginator-887637f3.json @@ -0,0 +1,5 @@ +{ + "type": "bugfix", + "category": "Paginator", + "description": "Fix nextPage typing in requests" +} \ No newline at end of file diff --git a/lib/response.d.ts b/lib/response.d.ts index cfbddc00bd..a95a7d3190 100644 --- a/lib/response.d.ts +++ b/lib/response.d.ts @@ -8,7 +8,8 @@ export class Response { /** * Creates a new request for the next page of response data, calling the callback with the page data if a callback is provided. */ - nextPage(callback?: (err: E, data: D) => void): Request|void; + nextPage(): Request | null; + nextPage(callback: (err: E, data: D) => void): void; /** * The de-serialized response data from the service. * Can be null if an error occurred.