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

feat(pick, omit): Restrict the type of arguments in object utils #35

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

juno7803
Copy link
Member

@juno7803 juno7803 commented Jun 11, 2024

It fixes #25 ("Accepts All Types" section).

In the original pick and omit functions, non-object values could be passed as the first argument. I have added code to restrict this to the object type. (Record<string, any>)

juno7803 and others added 2 commits June 12, 2024 02:49
Co-authored-by: 김관식 <39869096+gwansikk@users.noreply.github.com>
@juno7803 juno7803 self-assigned this Jun 11, 2024
Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
es-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 5:50pm

@juno7803 juno7803 requested a review from raon0211 June 11, 2024 17:50
Copy link
Collaborator

@raon0211 raon0211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems necessary. Thanks for pointing this out!

@raon0211 raon0211 changed the title feat(object*): Restrict the type of arguments in object utils feat(pick, omit): Restrict the type of arguments in object utils Jun 12, 2024
@raon0211 raon0211 merged commit 79ce446 into main Jun 12, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving Type Definitions in Object Utils
2 participants