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

Lean query converts to binary when using generic as type #15158

Closed
2 tasks done
timheerwagen opened this issue Jan 6, 2025 · 0 comments · Fixed by #15160
Closed
2 tasks done

Lean query converts to binary when using generic as type #15158

timheerwagen opened this issue Jan 6, 2025 · 0 comments · Fixed by #15160
Labels
typescript Types or Types-test related issue / Pull Request
Milestone

Comments

@timheerwagen
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Mongoose version

8.9.3

Node.js version

22.10.5

MongoDB server version

6.12.0

Typescript version (if applicable)

5.7.2

Description

When using lean query with a generic type of FooBar or object a typescript error gets thrown similar to this error: #15122

My last working version was ^8.7.0.

Steps to Reproduce

Reproduction Link: https://stackblitz.com/edit/vitejs-vite-tstcb3k5?file=src%2Findex.ts

Expected Behavior

No response

@vkarpov15 vkarpov15 added this to the 8.9.4 milestone Jan 6, 2025
@vkarpov15 vkarpov15 added the typescript Types or Types-test related issue / Pull Request label Jan 6, 2025
vkarpov15 added a commit that referenced this issue Jan 8, 2025
types: avoid BufferToBinary<> wiping lean types when passed to generic functions
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.

2 participants