I tried to find a way to extract the string type from an intersection type. Is there a way to do that?
i.e.:
type R = Extract<string & { a: 1 }> // string
type R1 = Extract<`abc` & { a: 1 }> // `abc`
type R2 = Extract<`${number}` & { a: 1 }> // `${number}`
type R3 = Extract<`a ${Uppercase<string>}` & { a: 1 }> // `a ${Uppercase<string>}`