DEV Community

Discussion on: How to add types for Object.fromEntries

Collapse
 
dwelle profile image
David Luzar • Edited

Good article. Built-in generics, especially DOM-related, sadly aren't very good.

Btw, you can replace the ArrayElement<T> generic with a simple T[number].

Collapse
 
svehla profile image
Jakub Švehla

Hah, now I'm using T[number] 100% of the time. Thanks for the hint!