Skip to content

Data update: Typing for 3 Letter country code #174

Description

@avalatea

Data changes

Right now, the typing for 3 letter codes are awkward:

import countries3to2 from 'countries-list/minimal/countries.3to2.min.json';

function convert(threeCode: keyof typeof countries3to2): string {
    return countries3to2[threeCode];
}

If we can get one of the below, the typing would be a lot less awkward:

  • an internal, typed function that does countries3to2 conversion
  • a typed list of 3 codes

Links & sources

Here is a valid source for this change:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions