본문 바로가기

타입스크립트 타입챌린지64

타입챌린지 : 3326-BEM style string (medium) 이 글은 제가 타입챌린지를 하면서 해석한 내용을 적는 글입니다. 틀린 내용이 있으면 댓글 달아주시면 감사하겠습니다. https://github.com/type-challenges/type-challenges/blob/main/questions/03326-medium-bem-style-string/README.md 쉽게 말하면 제네릭 B를 기반으로 조합할 수 있는 E와 M을 유니온 타입으로 뽑으면 된다. (근데 조금 애매한게, E의 경우 중복해서 정의할 수 있는지를 잘 모르겠다) type BEM = M extends [infer F extends string, ...infer O extends string[]] ? `${BEM}--${F}` | `${BEM}` : E extends [infer F exte.. 2023. 9. 14.
타입챌린지 : 3243-FlattenDepth (medium) 이 글은 제가 타입챌린지를 하면서 해석한 내용을 적는 글입니다. 틀린 내용이 있으면 댓글 달아주시면 감사하겠습니다. https://github.com/type-challenges/type-challenges GitHub - type-challenges/type-challenges: Collection of TypeScript type challenges with online judge Collection of TypeScript type challenges with online judge - GitHub - type-challenges/type-challenges: Collection of TypeScript type challenges with online judge github.com 제네릭으로 배열.. 2023. 5. 30.
타입챌린지 : 3196-Flip Arguments (medium) 이 글은 제가 타입챌린지를 하면서 해석한 내용을 적는 글입니다. 틀린 내용이 있으면 댓글 달아주시면 감사하겠습니다. https://github.com/type-challenges/type-challenges/blob/main/questions/03196-medium-flip-arguments/README.md GitHub - type-challenges/type-challenges: Collection of TypeScript type challenges with online judge Collection of TypeScript type challenges with online judge - GitHub - type-challenges/type-challenges: Collection of TypeSc.. 2023. 5. 26.
타입챌린지 : 3192-Reverse (medium) 이 글은 제가 타입챌린지를 하면서 해석한 내용을 적는 글입니다. 틀린 내용이 있으면 댓글 달아주시면 감사하겠습니다. https://github.com/type-challenges/type-challenges/blob/main/questions/03192-medium-reverse/README.md GitHub - type-challenges/type-challenges: Collection of TypeScript type challenges with online judge Collection of TypeScript type challenges with online judge - GitHub - type-challenges/type-challenges: Collection of TypeScript ty.. 2023. 5. 25.