-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeCommittedThe team has roadmapped this issueThe team has roadmapped this issueFixedA PR has been merged for this issueA PR has been merged for this issueIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
Search Terms
Omit
Suggestion
Add the following type to lib.d.ts:
type Omit<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;
More
Origin : #12215 (comment)
From : https://github.com/sindresorhus/type-fest/blob/0226ef2092ee2b07a8714c832d106da659877a8f/index.d.ts#L75 Please open new issues on TypeScript about making it built-in.
. I searched but couldn't find an issue, so here it is 🌹
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
dragomirtitian, NN---, malimccalla, csantos42, CvX and 174 moreulrichb, markdalgleish, capaj, kossnocorp, wpq0 and 23 morekossnocorp, vkrol, styfle, jefrydco, pascaliske and 9 more
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeCommittedThe team has roadmapped this issueThe team has roadmapped this issueFixedA PR has been merged for this issueA PR has been merged for this issueIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript