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

feature request: Omitdeep #576

Closed
wajeehsf opened this issue Mar 23, 2023 · 1 comment · Fixed by #816
Closed

feature request: Omitdeep #576

wajeehsf opened this issue Mar 23, 2023 · 1 comment · Fixed by #816
Assignees

Comments

@wajeehsf
Copy link

wajeehsf commented Mar 23, 2023

Create a type that can omit deeply nested properties.

Something like this:

import { OmitDeep } from 'type-fest';

interface User {
  id: number;
  name: string;
  address: {
    street: string;
    city: string;
    state: string;
    zip: string;
  };
}

type UserWithoutZip = OmitDeep<User, 'address.zip'>;

It should work for any any number of levels.

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
@sadik-malik
Copy link

Unfamiliar with this library myself, but its potential for simplifying nested type omission caught my eye. Worth a look? https://github.com/tobloef/deep-omit-ts

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 a pull request may close this issue.

3 participants