let pr = new Promise((r)=>r(1))
pr.run = function(){
}
现在报错Property 'run' does not exist on type 'Promise<unknown>'
自己是这么定义的不知道对不对
type CustomPromise<T=any> = Promise<T> & {run(): void}
let pr:CustomPromise = new Promise((r)=>r(1)) as CustomPromise
pr.run = function(){
}
哪位老哥能指点下感谢🙏