반응형
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
- Node.js
- 프로그래머스
- type challenge
- 그래프
- 알고리즘
- 자바스크립트
- HTTP 완벽 가이드
- socket
- 타입스크립트
- 크롤링
- 레벨 1
- 프로그래머스 레벨 2
- 타입 챌린지
- typescript
- Algorithm
- javascript
- HTTP
- ip
- Nestjs
- Crawling
- 쉬운 문제
- 백준
- BFS
- 문자열
- TCP
- 가천대
- dfs
- dp
- 소켓
- 수학
Archives
- Today
- Total
목록infer R (1)
kakasoo
MyAwaited, 프로미스 내부의 타입을 추론해서 꺼내기
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: number) => any) => any } type cases = [ Expect, Expect, Expect, Expect, Expect, ] // @ts-expect-error type error = MyAwaited type MyAwaited = T extends PromiseLike ? R : T; // NOTE : 여전히 에러가 나는 케이스 // Expect // Expect infer R을 이용해서,..
프로그래밍/TypeScript
2023. 2. 25. 00:53