Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript compatibility request #20

Open
st-clair-clarke opened this issue May 25, 2021 · 2 comments
Open

Typescript compatibility request #20

st-clair-clarke opened this issue May 25, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed v2.0.0

Comments

@st-clair-clarke
Copy link

Hi,
Is it possible to have Typescript definition files for country-flags-svg please.

Thanks

@ronatskiy ronatskiy added the enhancement New feature or request label Feb 9, 2022
@alexmac131
Copy link

Yes please, i would like this as well. This would then be more usable in angular 13 +

@MihailCarabetchi
Copy link

declare module 'country-flags-svg' {
  const countries: CountryData[];
  const flagUrls: Record<string, string>;

  function findFlagUrlByCountryName(countryName: string): string;
  function findFlagUrlByNationality(nationality: string): string;
  function findFlagUrlByIso2Code(iso2Code: string): string;
  function findFlagUrlByIso3Code(iso3Code: string): string;

  interface CountryData {
    name: string;
    demonym: string;
    flag: string;
    iso2: string;
    iso3: string;
    altSpellings: string[];
  }
}

@ronatskiy ronatskiy added the help wanted Extra attention is needed label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed v2.0.0
Projects
None yet
Development

No branches or pull requests

4 participants