1.0.4 • Published 6 months ago
@types/express-paginate v1.0.4
Installation
npm install --save @types/express-paginate
Summary
This package contains type definitions for express-paginate (https://github.com/niftylettuce/express-paginate).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-paginate.
index.d.ts
// Type definitions for express-paginate 1.0
// Project: https://github.com/niftylettuce/express-paginate
// Definitions by: Amir Tugendhaft <https://github.com/AmirTugi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
import express = require("express");
declare global {
namespace Express {
interface Request {
skip?: number | undefined;
offset?: number | undefined;
}
}
}
export interface PageElement {
number: number;
url: typeof href;
}
export function middleware(limit?: number, maxLimit?: number): (req: express.Request, res: express.Response, next: express.NextFunction) => void;
export function hasNextPages(req: express.Request): (pageCount: number) => boolean;
export function href(req: express.Request): (prev: object | boolean, params: object) => string;
export function getArrayPages(req: express.Request): (limit: number, pageCount: number, currentPage: number) => PageElement[];
Additional Details
- Last updated: Thu, 08 Jul 2021 12:01:20 GMT
- Dependencies: @types/express
- Global values: none
Credits
These definitions were written by Amir Tugendhaft.