Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

How to correctly type custom plugins? Also unable to register previously working plugins since v6.5.2 #12454

Copy link
Copy link
Closed
@rubek-joshi

Description

@rubek-joshi
Issue body actions

Prerequisites

  • I have written a descriptive issue title

Mongoose version

6.6.1

Node.js version

16.14.0

MongoDB version

5.0.5

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

11

Issue

My custom plugin used to be typed correctly up to version 6.5.1 where I'm basically following this guide. However, starting from v6.5.2 to the current v6.6.1, I get the following:
image

I was also unable to register the mongoose-unique-validator plugin and being shown the following error in my IDE:
image

I can't seem to find any info in the docs regarding how to correctly type my custom plugin nor am I sure if this is a bug or a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryhelp wantedtypescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.