How do I create and export a new interface – UIInterface: (would like to combine SummaryInterface with few other new properties)
Example:
import { SummaryInterface } from 'x-api'; // summaryInterface has 20+ properties defined and is auto-generated from script
My attempt
export interface UIInterface {
SummaryInterface &
{ displayStatus: string;
flag: boolean };
}
Advertisement
Answer
By extending the other interface like so:
export interface UIInterface extends SummaryInterface {
displayStatus: string;
flag: boolean;
}