As template literal types are now supported in TypeScript, is it possible to have something like the following?
interface Data {
a: number;
b: {
c: number;
d: number;
}
}
type OmitDeep<T, K> = ...
type WithoutC = OmitDeep<Data, 'b.c'>
Where WithoutC
will be inferred as:
interface WithoutC {
a: number;
b: {
d: number
}
}