Created
August 1, 2021 06:39
-
-
Save Goldziher/afe89d427fff79a146f778b761bcb8cc to your computer and use it in GitHub Desktop.
EntityInterface helper type
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 EntityInterface<Entity, Base> = { | |
[K in keyof Omit<Entity, keyof Base>]: K extends Base | |
? Omit<Entity, keyof Base> | |
: Entity[K]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment