DEV Community

Discussion on: How to add types for Object.fromEntries

Collapse
 
benlesh profile image
Ben Lesh

This is a GREAT article! Near miss in one small spot: Cast should be used to cast to PropertyKey instead of string. Then number and symbol will work as well!

Example here:

typescriptlang.org/play?#code/PTAE...

Collapse
 
svehla profile image
Jakub Švehla

wow, very nice! 😎 thanks for sharing