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(DocumentArray): pass DocType generic to Document for correct toJSON() and toObject() return types #14526

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14469

Summary

Due to missing generic, toObject() and toJSON() on array subdocs currently returns any.

Examples

@hasezoey hasezoey changed the title types(DocumentArray): pass DocType generic to Document for correct toSON() and toObject() return types types(DocumentArray): pass DocType generic to Document for correct toJSON() and toObject() return types Apr 15, 2024
@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Apr 15, 2024
@vkarpov15 vkarpov15 merged commit 0c5ec09 into master Apr 16, 2024
5 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14469 branch April 16, 2024 15:02
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 this pull request may close these issues.

Type of subdocument not inferred in toJSON()
2 participants