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

DeepPartialType #3125

Open
1 task done
1993alexey opened this issue Oct 25, 2024 · 0 comments
Open
1 task done

DeepPartialType #3125

1993alexey opened this issue Oct 25, 2024 · 0 comments
Labels

Comments

@1993alexey
Copy link

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Mapped types is a great way to reduce boilerplate code. I have a standard backend service that exposes a few endpoints. Along with this service, I also have an SDK that reuses the same DTOs as the backend service. The problem is that PartialType is only doing a shallow implementation. My multi-level DTOs now require users to specify all of the properties in nested layers instead of making them optional.

Describe the solution you'd like

It would be great to have DeepPartialType so that all nested layers become optional

Teachability, documentation, adoption, migration strategy

Usage is identical to PartialType

What is the motivation / use case for changing the behavior?

To reduce boilerplate code and make developer life easier

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

No branches or pull requests

1 participant