---
title: "#type-challenges articles | Hashnode"
description: "Explore 3 articles tagged #type-challenges on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/type-challenges"
---

Tag

# #type-challenges

3 posts · 0 followers

[mmyeon](https://hashnode.com/@yarnmi) · [May 22, 2025](https://hashnode.com/posts/type-challenges-awaited-if-concat/682e95d2ece1fb08e0760b18)

### [\[type-challenges\] Awaited / If / Concat](https://yarnmi.hashnode.dev/type-challenges-awaited-if-concat?utm_source=hashnode&utm_medium=feed)

Awaited 설계 의도 제네릭타입 T를 PromiseLike<any> 로 정의하여서 Promise, then 메서드 가진 함수 모두 받도록 처리 infer 사용해서 PromiseLike의 내부 타입 추출 다중 Promise 중첩 처리에서 최종 결과 타입 풀어내기 위해서 재귀적 조건부 타입 사용 Promise<T> vs PromiseLike<T> Promise<T>는 Promise 객체의 전체 API를 나타내는 반면, PromiseL...

2 min read · [yarnmi.hashnode.dev](https://yarnmi.hashnode.dev/type-challenges-awaited-if-concat?utm_source=hashnode&utm_medium=feed)

[mmyeon](https://hashnode.com/@yarnmi) · [May 21, 2025](https://hashnode.com/posts/type-challenges-first-of-array-length-of-tuple-exclude/682d6d5d26bb3b1fee6f04ef)

### [\[type-challenges\] First of Array / Length of Tuple / Exclude](https://yarnmi.hashnode.dev/type-challenges-first-of-array-length-of-tuple-exclude?utm_source=hashnode&utm_medium=feed)

First of Array 설계 의도 빈 배열인 경우는 never 타입 리턴하고, 그 외는 배열의 첫 번째 요소 리턴하도록 구현 코드 type First<T extends any\[\]> = T extends \[\] ? never : T\[0\] /\* \_\_\_\_\_\_\_\_\_\_\_\_\_ Test Cases \_\_\_\_\_\_\_\_\_\_\_\_\_ \*/ import type { Equal, Expect } from '@type-challenges/utils' type cas...

2 min read · [yarnmi.hashnode.dev](https://yarnmi.hashnode.dev/type-challenges-first-of-array-length-of-tuple-exclude?utm_source=hashnode&utm_medium=feed)

[mmyeon](https://hashnode.com/@yarnmi) · [May 20, 2025](https://hashnode.com/posts/type-challenges-pick-readonly-tuple-to-object/682c1f3a5013f124ef90489c)

### [\[type-challenges \] Pick / Readonly / Tuple to Object 구현](https://yarnmi.hashnode.dev/type-challenges-pick-readonly-tuple-to-object?utm_source=hashnode&utm_medium=feed)

Pick<T, K> 설계 의도 K타입은 T 타입의 key만 오도록 제한 Mapped Types 사용해서 제한된 key 타입에 해당하는 타입만 리턴하도록 처리 코드 /\* \_\_\_\_\_\_\_\_\_\_\_\_\_ Your Code Here \_\_\_\_\_\_\_\_\_\_\_\_\_ \*/ type MyPick<T, K extends keyof T> = { \[P in K\] : T\[P\] } /\* \_\_\_\_\_\_\_\_\_\_\_\_\_ Test Cases \_\_\_\_\_\_\_\_\_\_\_\_\_ \*/ i...

2 min read · [yarnmi.hashnode.dev](https://yarnmi.hashnode.dev/type-challenges-pick-readonly-tuple-to-object?utm_source=hashnode&utm_medium=feed)
