New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/mongoose-paginate

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/mongoose-paginate

TypeScript definitions for mongoose-paginate

  • 5.0.16
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.7K
increased by19.09%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/mongoose-paginate

Summary

This package contains type definitions for mongoose-paginate (https://github.com/edwardhotchkiss/mongoose-paginate).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongoose-paginate.

index.d.ts

/// <reference types="mongoose" />

declare module "mongoose" {
    export interface PaginateOptions {
        select?: Object | string | undefined;
        sort?: Object | string | undefined;
        populate?:
            | Object[]
            | string[]
            | Object
            | string
            | QueryPopulateOptions
            | undefined;
        lean?: boolean | undefined;
        leanWithId?: boolean | undefined;
        offset?: number | undefined;
        page?: number | undefined;
        limit?: number | undefined;
    }

    interface QueryPopulateOptions {
        /** space delimited path(s) to populate */
        path: string;
        /** optional fields to select */
        select?: any;
        /** optional query conditions to match */
        match?: any;
        /** optional model to use for population */
        model?: string | Model<any> | undefined;
        /** optional query options like sort, limit, etc */
        options?: any;
        /** deep populate */
        populate?: QueryPopulateOptions | QueryPopulateOptions[] | undefined;
    }

    export interface PaginateResult<T> {
        docs: T[];
        total: number;
        limit: number;
        page?: number | undefined;
        pages?: number | undefined;
        offset?: number | undefined;
    }

    interface PaginateModel<T extends Document> extends Model<T> {
        paginate(
            query?: Object,
            options?: PaginateOptions,
            callback?: (err: any, result: PaginateResult<T>) => void,
        ): Promise<PaginateResult<T>>;
    }

    export function model<T extends Document>(
        name: string,
        schema?: Schema,
        collection?: string,
        skipInit?: boolean,
    ): PaginateModel<T>;

    export function model<T extends Document, U extends PaginateModel<T>>(
        name: string,
        schema?: Schema,
        collection?: string,
        skipInit?: boolean,
    ): U;
}

declare module "mongoose-paginate" {
    import mongoose = require("mongoose");
    var _: (schema: mongoose.Schema) => void;
    export = _;
}

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: @types/node, mongoose

Credits

These definitions were written by Linus Brolin.

FAQs

Package last updated on 21 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc