Skip to content

feat: use placeholder mql types MONGOSH-2333 #2485

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

Merged
merged 6 commits into from
Jun 25, 2025
Merged

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Jun 25, 2025

The idea is that these would be easy to find/replace in the autocompleter while being semantically better than what we have and not adding any complexity for TypeScript.

@lerouxb lerouxb marked this pull request as ready for review June 25, 2025 13:46
@lerouxb lerouxb requested a review from a team as a code owner June 25, 2025 13:46
@@ -560,7 +561,7 @@ export class Collection<
@returnType('Document')
@apiVersions([1])
async findOne(
query: Document = {},
query: MQLQuery = {},
projection?: Document,
options: FindOptions = {}
): Promise<C['schema'] | null> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

^ should we also do something for the return types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh wow I totally missed that. Yes I think so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this was actually the only usage of C['schema'] and I changed it to MQLDocument now. But I can't easily think of other places that should change too 🤔

@lerouxb lerouxb merged commit d64d269 into main Jun 25, 2025
132 of 135 checks passed
@lerouxb lerouxb deleted the placeholder-mql-types branch June 25, 2025 20:54
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.

2 participants