-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[REG 6->7] Plain fields cannot be assigned in special case (typescript error) #13529
Comments
As far as I can tell, the script as written should throw an error. |
@vkarpov15 Notice that This is caused by |
See microsoft/TypeScript#39556 and many other related issues. Fixes Automattic#13529.
See microsoft/TypeScript#39556 and many other related issues. Fixes Automattic#13529.
types: avoid unnecessary MergeType<> if TOverrides not set, clean up statics and insertMany() type issues
Prerequisites
Mongoose version
7.3.0
Node.js version
18.16.0
MongoDB server version
5.x
Typescript version (if applicable)
5.1.3
Description
Directly assigning to fields of a document fails with v7 when the document is generic (special case, see example).
Steps to Reproduce
If I replace
`${ResourceType}Id`
with'FooId'
then it works.Expected Behavior
It should work.
The text was updated successfully, but these errors were encountered: