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
- 자료구조
- jest
- Dinosaur
- cookie
- flask
- TypeScript
- mongoose
- 공룡게임
- GIT
- MongoDB
- 게임
- Express
- react
- MySQL
- JavaScript
- class
- OCR
- Nest.js
- typeORM
- Sequelize
- dfs
- nodejs
- Bull
- nestjs
- 정렬
- Queue
- game
- AWS
- Python
Archives
- Today
- Total
목록utility type (1)
포시코딩
1월31일 - TypeScript: Utility Type
개요 Enum, Generic은 자주 접하다보니 어느정도 익숙해졌는데 Utility Type이라는 새로운걸 접해서 정리해봄 Partial Partial(파셜)은 특정 타입에 속해있는 집합을 모두 선택적으로 만드는 타입으로 변환 interface Toppings { tomatoes: boolean, onion: boolean, lettuce: boolean, } const toppingsIWant: Partial = { onion: true, letttuce: undefined, // 다른 집합은 있어도 되고 없어도 되고 undefined로 명시해줘도 됨 } ex) 햄버거 주문 API에서 토핑을 유저가 선택적으로 주문할 수 있게 인터페이스를 만들 때 유용 Required Partial의 반대. 특정 타입에..
TIL
2023. 1. 31. 15:51