Functions type for key of objects with specific key
Hey, are there any typescript wizards here that could help? I've been trying for a while already but don't really get there. I would like to type a function that takes in two arguments: an arbitrary object as the first argument and for the second argument a key of that object but only allow keys with e.g. a number as an associated value. What's the best way to do this?
This is what I have so far. I only want to allow valueKeys which have a type number as a value. Thanks!