Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Types] populate('path', 'selection', model) syntax not supported in types #11598

Closed
hasezoey opened this issue Mar 30, 2022 · 2 comments · Fixed by #11649
Closed

[Types] populate('path', 'selection', model) syntax not supported in types #11598

hasezoey opened this issue Mar 30, 2022 · 2 comments · Fixed by #11649
Labels
typescript Types or Types-test related issue / Pull Request
Milestone

Comments

@hasezoey
Copy link
Collaborator

Do you want to request a feature or report a bug?
types

What is the expected behavior?
from what i can tell the syntax doc.populate('path', 'selection', model) is currently not in the types

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
mongoose 6.2.9


Reference to the syntax i mean:

* await doc.populate('fans', '-email');
(only that from what i can tell a third parameter for a model is also supported)

@IslandRhythms IslandRhythms added the typescript Types or Types-test related issue / Pull Request label Mar 30, 2022
@Uzlopak
Copy link
Collaborator

Uzlopak commented Apr 8, 2022

@mohammad0-0ahmad
Can you have a look at it?

@mohammad0-0ahmad
Copy link
Contributor

mohammad0-0ahmad commented Apr 8, 2022

This issue is confirmed @Uzlopak,
This is related to these types:

populate<Paths = {}>(path: string | PopulateOptions | (string | PopulateOptions)[], callback: Callback<this & Paths>): void;

@vkarpov15 vkarpov15 added this to the 6.2.13 milestone Apr 14, 2022
@Uzlopak Uzlopak linked a pull request Apr 21, 2022 that will close this issue
vkarpov15 added a commit that referenced this issue Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants