typescript - typeScript - 在哪里可以找到Promise的类型定义

我创建了一个简单的类(Primrose ),它扩展了全局Promise来添加resolvereject方法,


export class Primrose<Resolution> extends Promise<Resolution>{



 private _resolve: /* Type binding should be here */


 private _reject: /* Type binding should be here */



 constructor() {


 super((_resolve, _reject) => {


 this._resolve = _resolve


 this._reject = _reject


 })


 }



 resolve(resolution: Resolution) {


 this._resolve(resolution)


 }



 reject(rejection) {


 this._reject(rejection)


 }



}



我想给_promise和_reject适当的类型绑定,但是我不知道这些绑定在哪里,我在哪里能找到他们?

时间: 作者:

a)为node安装type:npm install --save-dev @types/ node

或者

b)或者,如果是浏览器框架,将"dom"添加到tsconfig中的lib数组中:lib : ["dom ", " es2015"...etc ]

作者:
...