Last active
June 13, 2018 18:16
-
-
Save VitorLuizC/4b69c961c66841883c41f3a161a6fc42 to your computer and use it in GitHub Desktop.
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
declare type NonNullablePropertyNames <T extends Object> = | |
{ [K in keyof T]: T[K] extends null | undefined ? never : K }[keyof T]; | |
declare type Merge <T extends Object, U extends Object> = | |
Pick<T, Exclude<keyof T, keyof U>> & Pick<U, NonNullablePropertyNames<U>>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment