Skip to content

Conversation

flaviotux
Copy link

The extended mongoose Document will be dropped in the next major version.

We strongly recommend against using this approach, its support will be dropped in the next major version as it causes major performance issues. Many Mongoose TypeScript codebases use the below approach. - https://mongoosejs.com/docs/typescript.html#using-extends-document

It will correctly infer the model or collection TypeScript types when mongoose.

Interface

Captura de Tela 2022-06-19 às 20 40 56

Before

Captura de Tela 2022-06-19 às 20 41 30

After

Captura de Tela 2022-06-19 às 20 39 51

The extended mongoose Document will be dropped in the next major version.
@flaviotux flaviotux closed this Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant