Everywhere I look, I seem to be writing the following:
product: Product & { id: string; };
Is there a way for me to simplify this to:
product: WithId<Product>;
I attempted to create an interface like the one below, but encountered issues with extending from generics:
export interface WithId<T> extends T {
id: string;
}