Skip to content

Type Alias: CountryAlpha3

ts
type CountryAlpha3 = (typeof CountryAlpha3)[number];

Type representing any valid ISO 3166-1 alpha-3 country code.

This creates a union type of all three-letter country codes, providing type safety when working with alpha-3 codes.

Example

typescript
const countryCode: CountryAlpha3 = "USA"; // ✓ Valid
const invalidCode: CountryAlpha3 = "ZZZ"; // ✗ TypeScript error