Structures (records)

type Point = Record<'x' | 'y'number>

let p: Point = { x: 1, y: 1 }
console.log(`p.x is ${p.x}, p.y is ${p.y}`)

type Size = {
    h: number
    w: number
}

let s: Size = { h: 5, w: 5 }
console.log(`s.h is ${s.h}, s.w is ${s.w}`)