Reputation: 53870
I have two properties of an interface:
export interface IInvoicesData {
invoice: IInvoice;
invoiceWithTotals: IInvoice & IInvoiceTotals;
}
This works fine and I make invoiceWithTotals
property to contain properties from both IInvoice
& IInvoiceTotals
interfaces.
How can I move declaration IInvoice & IInvoiceTotals
to its own interface so that replace IInvoice & IInvoiceTotals
with something like IInvoiceWithTotals
besides using extends
?
Upvotes: 1
Views: 61
Reputation: 691865
type IInvoiceWithTotals = IInvoice & IInvoiceTotals;
seems to work fine.
Upvotes: 2