Skip to content

Instantly share code, notes, and snippets.

@MrMjauh
Last active June 11, 2019 22:04
Show Gist options
  • Save MrMjauh/e0263e97dcc147a098e38240b13ad827 to your computer and use it in GitHub Desktop.
Save MrMjauh/e0263e97dcc147a098e38240b13ad827 to your computer and use it in GitHub Desktop.
Person.tsx
// 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