Skip to content

jennysson-junior/mongoose-type-error

Repository files navigation

Example mongoose type error

This repository contain an quickly example of the bug that occurs an type error on mongoose.

screenshot-code-with-error

Here we have the section on code that are throwing the error

type-error Type errors that have been thrown



This error was reported as an issue on mongoose repository.

Here we have only the necessary to reproduce the error. Typescript on version 4.8.4 and mongoose on version 6.5.3.

It's important to mention that the error only occurs if you declare a pipeline as a const and pass to the Model.pipeline() function. Case you send the same param directly, it will works well.

same-code-working-as-well

Section of code that show working good.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published