I'm not quite sure how to fix it at the moment, but if someone else has a solution, I'm all ears. I know Lodash's types are pretty comprehensive, so I might start looking there myself
EDIT: I love it when I figure it out right after posting the comment. It needs to be string | number | symbol, since 3.0 expanded the kinds of types that can be used for object keys. We can shorten that to keyof any.
Turns out TS 3.0 broke this 🙃
I'm not quite sure how to fix it at the moment, but if someone else has a solution, I'm all ears. I know Lodash's types are pretty comprehensive, so I might start looking there myself
EDIT: I love it when I figure it out right after posting the comment. It needs to be
string | number | symbol
, since 3.0 expanded the kinds of types that can be used for object keys. We can shorten that tokeyof any
.Updated the blog post. Thanks for the heads up 🙌
Nice! I ended up opting for the union type, just because
any
gives me anxiety . .👍 Might even be more readable that way.