-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add page iterator #353
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some unit tests so the basic stuff is covered please?
src/tasks/PageIterator.ts
Outdated
* @enum | ||
* Enum representing the state of the iterator | ||
*/ | ||
export enum PagingState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend against using enums since they are slowly going away and some ts configurations /deno/etc... now prohibit them. How about a union of string values instead?
src/tasks/PageIterator.ts
Outdated
* @class | ||
* Class for PageIterator | ||
*/ | ||
export class PageIterator<T extends Parsable, C extends Parsable> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing doc comments for the type parameters
const requestInformation = new RequestInformation(); | ||
requestInformation.httpMethod = HttpMethod.GET; | ||
requestInformation.urlTemplate = this.getOdataNextLink(); | ||
requestInformation.headers.addAll(this.headers); | ||
if (this.options) { | ||
if (this.options.headers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove the this.headers
property now that you have this here?
Resolves #6