오버로딩 함수의 모양이 같지만, 타입이 다른 경우 아래처럼 함수를 2개 만들어 사용하는 방법이 있다. function add1(a: string, b: string) { return a + b; } function add2(a: number, b: number) { return a + b; } add1('hello ','world'); add2(1,2); // add1('hello ',2); // 에러발생 // add2('hello ',2); // 에러발생 또 다른 방법으로 오버로딩을 사용할 수 있다. 오버로딩을 사용하는 법은 아래와 같다. function add(a: string, b: string):string // 타입 선언하는 부분 function add(a: number, b: number):n..