1. type BaseInfo ={
    2. name:string,
    3. age:number
    4. }
    5. type Contacts = {
    6. phone:string,
    7. address:string
    8. }
    9. /* 联合类型 */
    10. type Profile = BaseInfo & Contacts;
    11. var li:Profile ={
    12. name:"李四",
    13. age:18,
    14. phone:"122",
    15. address:"3232"
    16. }