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 |
Tags
- 스프링부트 update
- 타입스크립트 기초문법
- JS기초
- spring jpa 사이드프로젝트
- 파이썬 기초
- spring jpa 게시판
- typescript 기초문법
- 스프링부트 블로그만들기
- 스프링부트 블로그
- 스프링 게시판 만들기
- 유니티Cube
- jpa 게시판
- 타입스크립트 기본문법
- 파이썬 괄호 회전하기
- 유니티기초
- 괄호 회전하기 파이썬
- 스프링부트 게시판만들기
- springboot 게시판 프로젝트
- 프로그래머스 괄호 회전하기 python
- springboot 사이드프로젝트
- springboot 게시판만들기
- 스프링부트 회원가입
- springboot 게시판
- 스프링부트 미니프로젝트
- 타입스크립트 기초
- 유니티Material
- 스프링게시판프로젝트
- springboot 미니프로젝트
- 유니티
- python 괄호 회전하기
Archives
- Today
- Total
목록typescirpt 기본 (1)
Digking's cave
TypeScript 기본 / 기초문법 ) Polymorphism / Generic
다형성 Polymorphism / Generic generic은 call signature 작성할 때 들어오는 type을 확실히 모를 때 사용한다. 어떤 타입이 들어올지 모르고, 다양한 경우에 대비를 해야하는 경우 concrete type은 모든 경우를 다 작성해야 한다. 예시) type SuperPrint = { (arr: number[]) : void (arr: boolean[]) : void (arr: string[]) : void (arr: (string | number)[]) : void } const superPrint : SuperPrint = (arr) =>{ arr.forEach(i => console.log(i)) } superPrint([1,2,3,4]) superPrint([true..
기초/TypeScript
2022. 8. 24. 11:30