Open swarajbachu opened 9 months ago
I added a use-react-countries.d.ts to add types:
use-react-countries.d.ts
declare module 'use-react-countries' { type Countries = Array<{ name: string; capital: string; area: number; coordinates: [number, number]; currencies: Array<{ name: string; symbol: string; }>; languages: string[]; maps: { googleMaps: string; openStreetMaps: string; }; postalCode: { format: string; regex: string; }; flags: { png: string; svg: string; }; population: number; emoji: string; countryCallingCode: string; }>; export function useCountries(): { countries: Countries; setCountries: React.Dispatch<React.SetStateAction<Countries>> }; };
I added a
use-react-countries.d.ts
to add types: