From dd18d7ec535975029c0d1a4e39be1d38fa08317e Mon Sep 17 00:00:00 2001 From: Dmytro <1391015+dmythro@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:15:32 +0200 Subject: [PATCH] Update types and data for cases like #36 and #132 --- packages/countries/src/data/countries.ts | 2 ++ packages/countries/src/types.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/countries/src/data/countries.ts b/packages/countries/src/data/countries.ts index da5da28..bbd8221 100644 --- a/packages/countries/src/data/countries.ts +++ b/packages/countries/src/data/countries.ts @@ -135,6 +135,7 @@ export default { capital: 'Mariehamn', currency: ['EUR'], languages: ['sv'], + partOf: 'FI', }, AZ: { name: 'Azerbaijan', @@ -2212,6 +2213,7 @@ export default { capital: 'Pristina', currency: ['EUR'], languages: ['sq', 'sr'], + userAssigned: true, }, YE: { name: 'Yemen', diff --git a/packages/countries/src/types.ts b/packages/countries/src/types.ts index 689d2a6..2aa87a3 100644 --- a/packages/countries/src/types.ts +++ b/packages/countries/src/types.ts @@ -37,12 +37,19 @@ export interface ICountry { native: string /** * Specified in cases when entity is currently a part of another one. + * Example: Åland is an autonomous and demilitarised region of Finland and has own ISO code. + * See: https://en.wikipedia.org/wiki/Åland */ - parent?: TCountryCode + partOf?: string /** * Calling phone codes. */ phone: number[] + /** + * Specified in cases when entity is not a part of the main ISO 3166-1 standart, but a User assigned code. + * See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#User-assigned_code_elements + */ + userAssigned?: boolean } export interface ILanguage {