일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 스터디 회고
- nestjs
- Type Challenge
- 타입챌린지
- type challenge omit
- 타입 챌린지
- 맵필로그
- npm
- Conditional Types
- 타입 챌린지 IndexOf
- 이펙티브 타입스크립트
- TypeScript 타입챌린지
- node.js
- network
- 월간cs
- 해커톤
- Mappilogue
- 타입챌린지 Readonly2
- 와글와글
- 노드 교과서 개정2판
- 189-Awaited
- 타입스크립트
- Array.prototype.push
- 코딩테스트
- 와글와글 해커톤
- HTTP
- TypeScript
- 백엔드
- typeorm
- 타입 챌린지 Deep Readonly
- Today
- Total
목록Type Challenge (8)
iamkanguk.dev
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cUwstv/btsGvU5Ymph/w8Cao4I0M9ALao2X6ssktk/img.png)
문제 https://github.com/iamkanguk97/type-challenges/blob/main/questions/05153-medium-indexof/README.md type-challenges/questions/05153-medium-indexof/README.md at main · iamkanguk97/type-challenges Collection of TypeScript type challenges with online judge - iamkanguk97/type-challenges github.com 풀이 /* _____________ Your Code Here _____________ */ /* _____________ Test Cases _____________ */ impor..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/wkWsn/btsGmdFgSjA/c4rQd5zHu6c4yGUJ4Apod0/img.png)
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00009-medium-deep-readonly/README.md type-challenges/questions/00009-medium-deep-readonly/README.md at main · type-challenges/type-challenges Collection of TypeScript type challenges with online judge - type-challenges/type-challenges github.com 풀이 /* _____________ 여기에 코드 입력 _____________ */ type DeepReadonly = { readonly ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bpra07/btsF6HfPAKF/wgGdAIzG8L3gguLkM2ez4k/img.png)
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00008-medium-readonly-2/README.md type-challenges/questions/00008-medium-readonly-2/README.md at main · type-challenges/type-challenges Collection of TypeScript type challenges with online judge - type-challenges/type-challenges github.com 정답 // 1번째 방법과 2번째 방법의 차이는 내장 메서드인 Omit을 사용했냐 안했냐의 차이! // 다양하게 구현할 수 있었던 문제였던 것 같음. 하..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/UP4ch/btsF4YGF375/iWVJOxC1XlvxN4KgPN5DFk/img.png)
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00003-medium-omit/README.md type-challenges/questions/00003-medium-omit/README.md at main · type-challenges/type-challenges Collection of TypeScript type challenges with online judge - type-challenges/type-challenges github.com 풀이 type MyOmit = { [U in keyof T as U extends K ? never : U]: T[U] } /* _____________ 테스트 케이스 __..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cgTiDI/btsFT1xhOW4/QAUdldoLYqv2KtUCKek4Kk/img.png)
문제 https://github.com/iamkanguk97/type-challenges/blob/main/questions/00189-easy-awaited/README.md 풀이 type MyAwaited = T extends PromiseLike ? R extends PromiseLike ? MyAwaited : R : never; /* _____________ 테스트 케이스 _____________ */ import type { Equal, Expect } from '@type-challenges/utils' type X = Promise type Y = Promise type Z = Promise type Z1 = Promise type T = { then: (onfulfilled: (arg: ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/d4hDUD/btsFF8w2L1Z/2dKmM5rMipl8vAvQBY7PX1/img.png)
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00014-easy-first/README.md type arr1 = ['a', 'b', 'c'] type arr2 = [3, 2, 1] type head1 = First // expected to be 'a' type head2 = First // expected to be 3 Expect, Expect 123>>, Expect, Expect, 풀이 // S1 type First = T extends [] ? never : T[0]; // S2 type First = T["length"] extends 0 ? never : T[0]; // S3 type First = T ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bh3B2R/btsFFlpUxsR/mgTJk72fONDtKluAi9GkNk/img.png)
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00011-easy-tuple-to-object/README.ko.md const tuple = ['tesla', 'model 3', 'model X', 'model Y'] as const; type result = TupleToObject // expected { tesla: 'tesla', 'model 3': 'model 3', 'model X': 'model X', 'model Y': 'model Y'} 풀이 type TupleToObject = { [V in T[number]]: V } How to Solve? T extends readonly any[]: any 타..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/lpH40/btsFzcZTTPr/memhlH5UT9uYUfveF2gzAk/img.png)
지금 TS를 사용하면서 백엔드 프로젝트를 진행하고 있는데 TS에 대해 겉핥기 식으로만 알면서 프로젝트를 하다 보니까 잘 사용하지 못하는 것 같다고 판단이 되었다. NestJS 오픈카톡방 커뮤니티에서 공유받아서.. 오늘부터 Type Challenge 라는 GitHub Repository에 들어가서 하루 또는 2일에 2문제씩 문제를 조금이나마 풀어보려고 한다. 문제 - https://github.com/type-challenges/type-challenges/blob/main/questions/00004-easy-pick/README.md 풀이 /** * (1) K는 T의 Key-Properties 이다 ==> MyPick * (2) K를 순회한다 ==> [B in K] (B는 K를 순회하면서 저장하는 변수..