I have this type:
interface Intf1
{
n: number;
s: string;
c: { x: number, y: string };
}
And I want to transform (may use generics, mapped types, etc) to one that I my use like this below. Rules is, non-object T changes to MyType and objects T transformed to T-like (with the same MyType rules appying to properties):
interface Intf2
{
n: MyType<number>;
s: MyType<string>;
c: { x: MyType<number>, y: MyType<string> };
}
Is this possible?