From 660b0439ba9f95f454d73e17575912c021c1efda Mon Sep 17 00:00:00 2001 From: Fridon Date: Thu, 23 Jun 2022 09:38:58 +0400 Subject: change population type to string in FetchedCountries --- src/countries.ts | 2 +- src/models/FetchedCountry.model.ts | 2 +- src/util/logger.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/countries.ts b/src/countries.ts index bf8ae84..432fcd1 100644 --- a/src/countries.ts +++ b/src/countries.ts @@ -93,7 +93,7 @@ export class Countries { country: country.name.common, capital: country.capital[0], flag: country.flag, - population: country.population, + population: country.population.toLocaleString(), region: country.region, currencies, languages, diff --git a/src/models/FetchedCountry.model.ts b/src/models/FetchedCountry.model.ts index be636ff..0dd783d 100644 --- a/src/models/FetchedCountry.model.ts +++ b/src/models/FetchedCountry.model.ts @@ -4,6 +4,6 @@ export interface FetchedCountry { languages: string; capital: string; region: string; - population: number; + population: string; currencies: string; } diff --git a/src/util/logger.ts b/src/util/logger.ts index 52965c8..2e9045a 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -30,7 +30,7 @@ export class Logger { nano.green("\nRegion:\t\t"), country.region, nano.green("\nPopulation:\t"), - country.population.toLocaleString(), + country.population, nano.green("\nCurrencies:\t"), country.currencies ); -- cgit v1.2.3