Skip to content

Commit

Permalink
AWS.Response.nextPage(): Don't require callback (#2580)
Browse files Browse the repository at this point in the history
AWS.Response.nextPage() does not require a callback argument, so make Typescript definition for callback optional.
  • Loading branch information
otterley authored and AllanZhengYP committed Mar 18, 2019
1 parent f9ef9b6 commit b35ed7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-Request-aff176f8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "Request",
"description": "Fix nextPage() method signature"
}
4 changes: 2 additions & 2 deletions lib/response.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class Response<D, E> {
/**
* 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<D, E>|void;
nextPage(callback?: (err: E, data: D) => void): Request<D, E>|void;
/**
* The de-serialized response data from the service.
* Can be null if an error occurred.
Expand All @@ -35,4 +35,4 @@ export class Response<D, E> {
* The raw HTTP response object containing the response headers and body information from the server.
*/
httpResponse: HttpResponse;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@
"helper-test": "mocha scripts/lib/test-helper.spec.js",
"csm-functional-test": "mocha test/publisher/functional_test"
}
}
}

0 comments on commit b35ed7b

Please sign in to comment.