Created
September 19, 2024 02:47
-
-
Save maman/3abcd4d14b076873b5f3353af8e1d85a to your computer and use it in GitHub Desktop.
Distributive Omit & Pick
This file contains 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
export type DistributiveOmit<T, K extends PropertyKey> = T extends any | |
? Omit<T, K> | |
: never; | |
export type DistributivePick<T, K extends keyof T> = T extends any | |
? Pick<T, K> | |
: never; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment