interface Address {
street: string;
suite: string;
city: string;
zipcode: '92998-3874';
geo: {
lat: -37.3159;
lng: 81.1496;
};
};
type Lettrer = 'a' | 'b' | ...
type Digit = 1 | 2 | ...
...
string
и просто number
.type ZipCode = string;
type GeoCoord = number;
type Coord =`${number}.${number}`;
type Zipcode =`${number}-${number}`;
let a: Coord = '-3.3' // ok
let b: Coord = "-81." // error
let c: Coord = "123.00" // ok
let d: Zipcode = '4565' // error
let e: Zipcode = '4565-' // error
let f: Zipcode = '4565-2' // ok
let g: Zipcode = '4565-2-2' // error