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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Omit's 2nd param to allow autocompletion of 1st param's keys #43768

Closed
wants to merge 1 commit into from

Conversation

EvanLovely
Copy link

Consider this code example when using Omit:

type Person = { 
  firstName: string; 
  lastName: string;
}
type X = Omit<Person, 'lastName'>;

Before, no autocompletion would happen when typing out 'lastName' and after this PR it does autocomplete the keys from Person.

Have a nice day! 馃憢

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Apr 21, 2021
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@tjjfvi
Copy link
Contributor

tjjfvi commented Apr 21, 2021

This is a breaking change; Omit<{ foo: 1 }, "bar"> being valid and a no-op is likely highly relied on

@AviVahl
Copy link

AviVahl commented Apr 22, 2021

See discussion at #30825

@EvanLovely
Copy link
Author

Makes sense; thanks for insight 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants