기본 타입 Union
let a: string | number; a = 1; a = "Hello
객체 Union Type
type Dog = { name: string; color: string; } type Person = { name: string; language: string; } type Union1 = Dog | Person
기본 타입의 Intersection Type은 never의 경우가 많다.
let variable: number & string;
객체 타입의 Intersection Type은 조합하는 객체 타입의 모든 값을 가지고 있어야 한다.
type Intersection = Dog & Person let intersection1: Intersection = { name: "", color: "", language: "" }