如何使用打字稿将接口组合成一个接口?

时间:2018-10-02 18:41:27

标签: javascript angular typescript

试图合并来自两个接口的响应,我将如何使用Typescript接口做到这一点?谢谢

interface.ts

export interface  IAdimDetails {
    header: another interface that contains header properties
    detail: another interface that contains detail properties
}

export interface ICustomerDetails {
   header: another interface that contains header properties
    detail: another interface that contains detail properties
}

export interface ICombinedResponses {
    header: any;
    Details: should have both interfaces response here  (IAdimDetails, ICustomerDetails) 
}

0 个答案:

没有答案