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

fix(types/query): bring "getFilter" and "getQuery" in-line with "find" and other types #14463

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

hasezoey
Copy link
Collaborator

Summary

This PR changes Query.getFilter and Query.getQuery to use RawDocType again, as this is the same argument as in .find's filter parameter.
In addition also pass-through the QueryHelpers and DocType in SchemaOptions's query's object (otherwise there is a test failure).

This change from e3f3205 somehow made it so that PopulatedDoc<Document, RefType> could not be narrowed down to the used RefType anymore, and i dont know why, but this change fixed it again for typegoose.

…" and other types

change "DocType" -> "RawDocType"
@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Mar 23, 2024
@hasezoey hasezoey requested a review from vkarpov15 March 23, 2024 12:53
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find, thanks 👍

@vkarpov15 vkarpov15 added this to the 8.2.4 milestone Mar 26, 2024
@vkarpov15 vkarpov15 merged commit ef4cb63 into Automattic:master Mar 26, 2024
3 checks passed
@hasezoey hasezoey deleted the fixQuery branch March 27, 2024 11:12
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.

2 participants