type-fest icon indicating copy to clipboard operation
type-fest copied to clipboard

Proposal: Modify, a slightly modified version of Merge

Open Evertt opened this issue 2 years ago • 2 comments

Modify is like Merge, but it allows you to remove properties from the resulting type if you define that property in the Source with type never.

See this playground, it will explain everything: https://tsplay.dev/m0zRrw

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Evertt avatar Apr 27 '23 11:04 Evertt

What's your argument for making a new type instead of supporting this in Merge?

sindresorhus avatar Apr 28 '23 08:04 sindresorhus

Yeah no good reason, I'd be very happy if this was just supported in Merge by default. And even better if it could be supported in MergeDeep as well.

Evertt avatar Apr 28 '23 08:04 Evertt