TypeScript
다향성 ( Polymorphyism ), 제네릭 ( Generic )
다향성 ( Polymorphyism ) poly란? => many, serveral, much, multi morphos란? => form, structure polymorphos란? => poly + morphos => 여러 다른 구조 call signature를 이용해봄. type TestPrint = { (arr: number[]):void (arr: boolean[]):void (arr: string[]):void } const testPrint:TestPrint = (arr) => { arr.forEach (i => console.log(i)) } testPrint([1, 2, 3, 4]) testPrint([true, false, false, true]) testPrint(["a", "b", ..
2023. 8. 4. 10:21