Repository navigation
feat[DistributiveOmit]: add distributive omit type - #2142
Merged
Merged
Conversation
Constraint: 제안된 키 제약 없는 동작과 유니온 멤버별 속성을 유지한다. Rejected: 기본 Omit만 사용 | 유니온 멤버별 고유 속성이 사라진다. Confidence: high Scope-risk: narrow
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
minsoo-web
marked this pull request as ready for review
October 16, 2026 10:24
Collaborator
|
Looks good overall! One thing. es-toolkit/types tries to follow native TS types as closely as possible for usability, so I'd rather have K take PropertyKey like Omit does instead of leaving it unconstrained. Then the body can just reuse Omit. Only the |
Constraint: TypeScript 기본 Omit과 동일하게 키를 PropertyKey로 제한한다. Rejected: 제약 없는 K 유지 | 기본 타입과 사용 규칙이 달라진다. Confidence: high Scope-risk: narrow
Member
Author
|
Thanks! |
dayongkr
approved these changes
Oct 17, 2026
dayongkr
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for your contribution!!
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use it to remove properties from a union without losing the properties specific to each member. The built-in
Omitonly keeps keys shared by all members, whereasDistributiveOmitapplies the omission to each member separately.Changes
I created documents for each language and wrote type implementations and test code