type KeysMatching = { [K in keyof T]-?: T[K] extends V ? K : never; }[keyof T]; export type StringKey = KeysMatching; export default KeysMatching;