Created
February 22, 2021 17:54
-
-
Save whoisryosuke/952cf670964d2027037a01390cb9582a to your computer and use it in GitHub Desktop.
Typescript - Omit multiple properties from a property -- via: https://stackoverflow.com/a/57603792
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 ComponentProps = { | |
x: number; | |
y: number; | |
j: string; | |
k: string; | |
}; | |
export type B = Omit<ComponentProps, 'j' | 'k'> | |
// Same as | |
// type B = { | |
// x: number; | |
// y: number; | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment