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

feat: enhance entries type #231

Merged
merged 1 commit into from
Sep 26, 2023
Merged

feat: enhance entries type #231

merged 1 commit into from
Sep 26, 2023

Conversation

ppeeou
Copy link
Member

@ppeeou ppeeou commented Sep 25, 2023

Fixes #230

@ppeeou ppeeou requested a review from hg-pyun September 25, 2023 11:47
@ppeeou ppeeou self-assigned this Sep 25, 2023
Copy link
Collaborator

@shine1594 shine1594 left a comment

Choose a reason for hiding this comment

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

suggestion:

type Entries<
  T extends Record<string, any>,
  K extends keyof T,
> = K extends string ? [K, T[K]] : never;

@ppeeou
Copy link
Member Author

ppeeou commented Sep 25, 2023

@shine1594 applied :)

Copy link
Collaborator

@shine1594 shine1594 left a comment

Choose a reason for hiding this comment

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

👍

@ppeeou ppeeou merged commit d1e0504 into main Sep 26, 2023
1 check passed
@ppeeou ppeeou deleted the fix/entries-type branch September 26, 2023 04:55
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.

feat: enhance entries type
3 participants