Keyof inferring string | number when key is only a string
As defined in the Release Notes of TypeScript 2.9, if you keyof an interface with a string index signature it returns a union of string and number Given an object type X, keyof X is resolved as follows: If X contains a string index signature, keyof X is a union of string, number, and the … Read more