I'm working on creating a child interface that mirrors the structure of a base interface. Any tips on how to achieve this?
interface BaseInterface {
api: { [key: string]: string };
ui: { [key: string]: string };
}
interface ChildInterface {
// I want to ensure that this interface matches the shape of BaseInterface
// like this:
api: { firstName: string };
ui: { firstName: string };
}
I attempted using
type ChildInterface = BaseInterface
but struggled with customizing my ChildInterface
.
Any insights would be greatly appreciated.