Skip to content

Commit

Permalink
Remove some redundant type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrence-forooghian committed Dec 11, 2023
1 parent b65c244 commit 95ef9e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/lib/client/paginatedresource.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Utils from '../util/utils';
import Logger from '../util/logger';
import Resource from './resource';
import ErrorInfo, { IPartialErrorInfo } from '../types/errorinfo';
import { IPartialErrorInfo } from '../types/errorinfo';
import { PaginatedResultCallback } from '../../types/utils';
import Rest from './rest';

Expand Down Expand Up @@ -187,22 +187,22 @@ export class PaginatedResult<T> {
const self = this;
if (relParams) {
if ('first' in relParams) {
this.first = function (callback: (result?: ErrorInfo | null) => void) {
this.first = function (callback) {
if (!callback && self.resource.rest.options.promises) {
return Utils.promisify(self, 'first', []);
}
self.get(relParams.first, callback);
};
}
if ('current' in relParams) {
this.current = function (callback: (results?: ErrorInfo | null) => void) {
this.current = function (callback) {
if (!callback && self.resource.rest.options.promises) {
return Utils.promisify(self, 'current', []);
}
self.get(relParams.current, callback);
};
}
this.next = function (callback: (results?: ErrorInfo | null) => void) {
this.next = function (callback) {
if (!callback && self.resource.rest.options.promises) {
return Utils.promisify(self, 'next', []);
}
Expand Down

0 comments on commit 95ef9e2

Please sign in to comment.