Created
July 4, 2020 12:44
-
-
Save rodgarcialima/95cd9d9bc34a5757228e211c33c1241c 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
type CountryCode = keyof typeof Countries; | |
const countries: Country[] = (Object.keys(Countries) as Array<CountryCode>).map( | |
(c) => { | |
const country = Countries[c]; | |
return { | |
code: c, | |
name: country.name, | |
nativeName: country.native, | |
flag: country.emojiU, | |
}; | |
} | |
); |
Author
rodgarcialima
commented
Jul 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment