Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: combineVowels 리턴 타입 보강 #308

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

skiende74
Copy link
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.

Copy link

changeset-bot bot commented Dec 27, 2024

🦋 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

Copy link

vercel bot commented Dec 27, 2024

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
Copy link
Collaborator

po4tion commented Dec 30, 2024

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

@skiende74
Copy link
Contributor Author

skiende74 commented Dec 31, 2024

@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
Copy link
Collaborator

@po4tion po4tion left a comment

Choose a reason for hiding this comment

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

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

Copy link
Member

@okinawaa okinawaa left a comment

Choose a reason for hiding this comment

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

작업 감사합니다!

@okinawaa okinawaa merged commit 7aac3ff into toss:main Jan 6, 2025
1 of 9 checks passed
@github-actions github-actions bot mentioned this pull request Jan 6, 2025
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