Skip to content

fix: combineVowels 리턴 타입 보강 - #308

Merged
okinawaa merged 2 commits into
toss:mainfrom
skiende74:feature/combineVowels-return-type
Jan 6, 2025
Merged

okinawaa merged 2 commits into
toss:mainfrom
skiende74:feature/combineVowels-return-type

Conversation

@skiende74

Copy link
Copy Markdown
Contributor

Overview

combineVowels의 리턴타입을 제네릭을 통해 type-narrowing 하도록 개선합니다.

PR Checklist

  • I read and included theses actions below
  1. I have read the Contributing Guide
  2. I have written documents and tests, if needed.

@changeset-bot

changeset-bot Bot commented Dec 27, 2024 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 110460e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Dec 27, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
es-hangul ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 6:22am

@skiende74 skiende74 changed the title feat: combineVowels 리턴 타입 보강 fix: combineVowels 리턴 타입 보강 Dec 27, 2024
@po4tion

po4tion commented Dec 30, 2024 •

Copy link
Copy Markdown
Collaborator

좋은 작업해주셔서 감사합니다! 혹시 comnbineVowels 로직의 가독성을 지금보다 더 향상시킬 수 있는 방법이 있을까요?

@skiende74

skiende74 commented Dec 31, 2024 •

Copy link
Copy Markdown
Contributor Author

@po4tion

좋은 작업해주셔서 감사합니다! 혹시 comnbineVowels 로직의 가독성을 지금보다 더 향상시킬 수 있는 방법이 있을까요?

type Invert<T extends Record<string, string>> = { [K in keyof T as T[K]]: K };
type CombineVowel = Invert<typeof DISASSEMBLED_VOWELS_BY_VOWEL>;

기존의 위 두 줄을

type Obj = typeof DISASSEMBLED_VOWELS_BY_VOWEL;
type CombineVowel = { [K in keyof Obj as Obj[K]]: K };

이렇게 고치면 조금 더 짧아질 것 같긴 합니다.

po4tion
po4tion previously approved these changes Jan 3, 2025

@po4tion po4tion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skiende74 님 좋은 의견 감사합니다!
@okinawaa 님 확인 부탁드립니다!

@okinawaa okinawaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

작업 감사합니다!

This branch was successfully deployed

1 active deployment
Preview — 110460e2 Deployed Jan 6, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants