16. [Ts]
다형성 type SuperPrint = { (arr: number()):void (arr: boolean()):void (arr:string()):void (arr: boolean|number()):void } const superPrint: SuperPrint = (arr) => { arr.forEach(i=>console.log(i)) } const a = superPrint((1,3,9)) const b = superPrint((‘1’,’3’,’9’)) const c = superPrint((false,3,9)) 기능하다 그러므로 첨부된 매개변수에 따라서 호출 서명~이다 의 형태 다양성 가지다 수도 있다. 일반적인 그러나 매개변수에 전달된 정확한 유형을 모르는 호출 … Read more