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 typings for insert to accept model data interface #2208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IlyaSemenov
Copy link
Contributor

I don't think #2190 has been given enough attention. Granted, the title was misleading, but it included a particular use case which was failing.

Even though objection.js documentation doesn't cover separation of model classes and model data interfaces, I don't believe this is an edge case which doesn't deserve any support.

This PR fixes the typings for plain insert (not insertGraph) to accept model data interfaces and adds the regression test.

@IlyaSemenov IlyaSemenov changed the title fixes #2190 Fix typings for insert to accept model data interface Jan 27, 2022
@lehni lehni added the typings label Apr 15, 2023
@najibghadri
Copy link

Is there any reason this shouldn't be merged? I don't see the point of having a PartialModelObject that has ModelObjects as fields. Or if you do then at least provide another type eg PartialModelRecursiveObject or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants