Skip to content

Instantly share code, notes, and snippets.

@Kiwka
Created December 4, 2019 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kiwka/647459a8ea3ed69ea2efcff162d7db38 to your computer and use it in GitHub Desktop.
Save Kiwka/647459a8ea3ed69ea2efcff162d7db38 to your computer and use it in GitHub Desktop.
Example of the named type for string types variable
export type BlogEntryId = string;
type BlogEntryType = {|
id: BlogEntryId,
...
|};
const blogEntry: = {
id: 'ddjj38302mmd92m2k2',
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment