News for hackers. Stuff that matters.
Re:Why Object.keys doesn't return (keyof T)[] by davedx on Tuesday May 09, 2023 @08:25AM (#35873310)
"However, it’s important to be aware of the potential drawbacks of using this type of wrapper, so consider adding a warning message to it."

Or just don't do it, it's not type safe.

Re:Why Object.keys doesn't return (keyof T)[] by asherah on Tuesday May 09, 2023 @08:30AM (#35873371)
i think it's reasonable for cases where you know the type, e.g. an internal object which a user of a library can't access