TypeScript 40 🔷 Structural Typing vs Nominal Typing
Every type system answers one question the same way: is this value assignable to that type? The answer depends on whether the system is structural — comparing shapes — or nominal — comparing names. TypeScript is structural. { x: number; y: number } is compatible with any other type that has x: number and y:…