I have a question regarding organizing the properties of an interface:
export interface IInvoicesData {
invoice: IInvoice;
invoiceWithTotals: IInvoice & IInvoiceTotals;
}
Currently, everything is functioning smoothly and I am able to consolidate properties from both IInvoice
and IInvoiceTotals
interfaces into the invoiceWithTotals
property.
However, I am interested in separating the declaration IInvoice & IInvoiceTotals
into its own interface. Is there a way for me to achieve this without using extends
, and instead replace IInvoice & IInvoiceTotals
with something like IInvoiceWithTotals
?