@types/express-paginate
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

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: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/express

Credits

These definitions were written by Amir Tugendhaft.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/express-paginate

Weekly Downloads

1,147

Version

1.0.4

License

MIT

Unpacked Size

4.2 kB

Total Files

5

Last publish

Collaborators

  • types