# @types/mongoose-sequence

> TypeScript definitions for mongoose-sequence

Latest version **3.0.11** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/mongoose-sequence
pnpm add @types/mongoose-sequence
yarn add @types/mongoose-sequence
bun add @types/mongoose-sequence
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.11 |
| Published | 2023-11-21 |
| First published | 2016-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51444 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/mongoose-sequence
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongoose-sequence
- npm.io page: https://npm.io/package/@types/mongoose-sequence

## Dependencies (2)

- [mongoose](https://npm.io/package/mongoose.md) ^6.3.0
- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 3.0.11 (latest) — 2023-11-21
- 3.0.7 (ts4.1) — 2022-04-24
- 3.0.6 (ts3.6) — 2021-07-08
- 3.0.4 (ts3.0) — 2020-02-25
- 3.0.3 (ts2.3) — 2017-08-21
- 3.0.1 (ts2.0) — 2016-09-21
- 3.0.10 — 2023-11-07
- 3.0.9 — 2023-10-18
- 3.0.8 — 2023-09-27
- 3.0.5 — 2021-06-03
- 3.0.2 — 2017-06-07

## README

# Installation
> `npm install --save @types/mongoose-sequence`

# Summary
This package contains type definitions for mongoose-sequence (https://github.com/ramiel/mongoose-sequence).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongoose-sequence.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongoose-sequence/index.d.ts)
````ts
/// <reference types="mongoose" />

declare module "mongoose" {
    export interface SequenceOptions {
        inc_field: string; // The name of the field to increment. Mandatory, default is _id
        id?: string | undefined; // Id of the sequence. Is mandatory only for scoped sequences but its use is strongly encouraged.
        reference_fields?: string[] | undefined; // The field to reference for a scoped counter. Optional
        disable_hooks?: boolean | undefined; // If true, the counter will not be incremented on saving a new document. Default to false
        collection_name?: string | undefined; // By default the collection name to mantain the status of the counters is counters. You can override it using this option
    }

    export interface SequenceDocument extends Document {
        setNext(sequenceId: string, callback: (err: any, res: SequenceDocument) => void): void;
    }

    export interface SequenceSchema extends Schema {
        plugin(
            plugin: (schema: SequenceSchema, options: SequenceOptions) => void,
            options: SequenceOptions,
        ): this;

        // overload for the default mongoose plugin function
        plugin(plugin: (schema: Schema, options?: Object) => void, opts?: Object): this;
    }
}

declare module "mongoose-sequence" {
    import mongoose = require("mongoose");
    var _: (schema: mongoose.Schema, options?: Object) => void;
    export = _;
}

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [mongoose](https://npmjs.com/package/mongoose)

# Credits
These definitions were written by [Linus Brolin](https://github.com/linusbrolin).

---
_Source: https://npm.io/package/@types/mongoose-sequence · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
