[TS] 타입 추론 및 타입 정의 연습
TIL
1. 타입 추론let a = 10;const b = 20;const c = [1, 2];const d = [1, "hello", true];const e = [1, 2, 3] as const;type A = number;type B = number;type C = number[];type D = (number | string | boolean)[];type E = [1, 2, 3]; 2. 조건을 만족하는 타입 정의- Animal 타입은 Dog 타입일수도 Cat 타입일수도 있다.- DogCat 타입은 Dog이자 Cat이다.type Dog = { name: string; color: string; };type Cat = { name: string; age: number; };type Animal = Do..