union function combine(input1: number, input2: number) { const result = input1 + input2; retrun result; } const combinedAges = combine(30, 26); console.log(combinedAges); const combinedNames = combine("Max", "Anna"); console.log(combinedNames); 위와 같은 함수에서, combineNames는 작동하지 않는다. 매개변수의 타입이 number로 명시되어 있기 때문. 이럴 때 union 타입을 사용할 수 있는데, | 기호로 여러 타입을 연결해주면 된다. 하지만 타입스크립트는 입력될 값이 number와 string이라는 것..