Reference · British country module
UKPostcodeAreatype
A postcode area: the town Royal Mail names it for, the country it delivers to (GB, or JE, GY and IM for the
Crown Dependencies), and for the United Kingdom the nation, absent for an area that is not a place (BF, BX).
Import it
import type { UKPostcodeArea } from "@johnmorrisdotca/address-plus/gb";
Definition
interface UKPostcodeArea {
name: string;
country: "GB" | "GY" | "IM" | "JE";
nation?: UKNationCode;
}
Members
| Name | Type | Description |
|---|---|---|
name | string | |
country | "GB" | "GY" | "IM" | "JE" | |
nation (optional) | UKNationCode | undefined |
Examples
import { GB_POSTCODE_AREAS } from "@johnmorrisdotca/address-plus/gb";
import type { UKPostcodeArea } from "@johnmorrisdotca/address-plus/gb";
console.log(GB_POSTCODE_AREAS.BT);
// → {"name":"Northern Ireland","country":"GB","nation":"NIR"}{ name: 'Northern Ireland', country: 'GB', nation: 'NIR' }What it prints (run when this page was built)