Last active
June 11, 2019 22:04
-
-
Save MrMjauh/e0263e97dcc147a098e38240b13ad827 to your computer and use it in GitHub Desktop.
Person.tsx
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
// Setting readonly to force immutability | |
interface Person { | |
readonly id: string; | |
readonly name: string; | |
// Using https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL | |
// to store image blob as temp urls | |
// Just remeber to call revokeObjectURL() when you are done with this | |
readonly avatarURL?: string; | |
readonly bannerURL?: string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment