How to get the type of a key of an interface