Suppose I have this interface
interface MyInterface {
val1: string
val2: string
val3: number
val4: string
val5: Date
}
I want to make a type that is the keys of the MyInterface but only the keys that are strings:
type myType = keyof MyInterface //where key === typeof 'string'
// myType: 'val1' | 'val2' | 'val4'
How could I do something like this?