Why does
Object.keys({ ... })return a value of typestring[]and notArray<keyof T>?
Consider the simple Point interface, and function f that operates on keyof Point (i.e. either "x" or "y") as a parameter.
Now suppose I create a new point NamedPoint which extends the Point interface.