lazy dev moment

master
Kit Kasune 3 years ago
parent 8a12728c99
commit eefbaf43fa
  1. 1
      util/pagination.d.ts
  2. 3
      util/pagination.js
  3. 3
      util/ts/pagination.ts

@ -20,6 +20,7 @@ export declare class Pagination {
endControllers(): Promise<Pagination>;
start(options?: {
endTime?: number;
time?: number;
startPage?: number;
user?: 'any' | string;
}): Promise<Pagination>;

@ -125,6 +125,9 @@ class Pagination {
}
;
async start(options) {
if (options && options.time) {
options.endTime = options.time;
}
await this.setPage(options && options.startPage ? options.startPage : 0);
await this.setControllers(options && options.endTime ? options.endTime : 60, options && options.user ? options.user : 'any');
return this;

@ -135,7 +135,8 @@ export class Pagination {
};
public async start(options?: {endTime?: number, startPage?: number, user?: 'any' | string}): Promise<Pagination> {
public async start(options?: {endTime?: number, time?: number, startPage?: number, user?: 'any' | string}): Promise<Pagination> {
if (options && options.time) {options.endTime = options.time;}
await this.setPage(options && options.startPage ? options.startPage : 0);
await this.setControllers(options && options.endTime ? options.endTime : 60, options && options.user ? options.user : 'any');

Loading…
Cancel
Save