Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- 셀렉트박스 커스텀
- Oracle LISTAGG 사용 예시
- ajax 사용 예시
- Angular Router
- prisma
- 호버
- mysql if
- TAILWIND
- route
- modal
- angular button
- 스크롤 이벤트
- 옵저버블
- 앵귤러 애니메이션
- 검색
- 모달
- scroll
- angular route
- 스크롤 이벤트 감지
- Ionic modal
- egov spring ajax 사용 예시
- angular modal
- ApexChart
- formgroup
- 앵귤러 모달
- 아이오닉 스크롤 이벤트
- flex-1
- angular animation
- summary
- Router
Archives
- Today
- Total
목록typescript Generic 활용 예시 (1)
깜놀하는 해므찌로
typescript Generic 활용 예시
/** Generic */ function getSize(arr:T[]){ // TypeParameter 일반적으로 T 사용 return arr.length; } const arr1 = [1, 2, 3]; getSize(arr1); const arr2 = ["1", "2", "3"]; getSize(arr2); const arr3 = [true, false, true]; getSize(arr3); // 호출 시 제네릭 입력 생략 가능 /** 인터페이스 예시 */ interface Mobile{ name : string; price : number; option : T; } const mobile1:Mobile = { name : "안드로이드", price : 1000, option : { color : ..
IT
2023. 5. 27. 13:10