Skip to content

Commit

Permalink
Change: PropertyKeyを使う
Browse files Browse the repository at this point in the history
Co-authored-by: Hiroshiba <hihokaruta@gmail.com>
  • Loading branch information
sevenc-nanashi and Hiroshiba authored Jan 3, 2025
1 parent 6a8ef0f commit a7dc338
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/helpers/typedEntries.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/** 型付きのObject.entries */
export const objectEntries = <
T extends Record<string | number | symbol, unknown>,
>(
export const objectEntries = <T extends Record<PropertyKey, unknown>>(
obj: T,
): [keyof T, T[keyof T]][] => {
return Object.entries(obj) as [keyof T, T[keyof T]][];
Expand Down

0 comments on commit a7dc338

Please sign in to comment.