使用举例:

doSomething(id:string):Promise<{id:string}>{
   return new Promise((resolve => {
       console.log("do something");
       setTimeout(()=>{
           resolve({id:id});
       },2000);
   }));
}

//调用
this.doSomething("9527").then((res)=>{
    console.log(res); //{id: "9527"}
});     

额外的,配合return可以实现链式操作。

this.doSomething("9527").then((res)=>{
            console.log(res); //{id: "9527"}
            return this.doSomething("1913")
        }).then(res=>{
            console.log(res); //{id: "1913"}
        });

参考:

https://www.cnblogs.com/whybxy/p/7645578.html

https://rexdainiel.gitbooks.io/typescript/content/docs/promise.html