且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

财产'捕获'在' PromiseLike& lt; void& gt;类型上不存在

更新时间:2022-02-24 04:05:46

承诺与参考相结合;可以在写入完成后解决,但可以立即用作对子位置的引用.

Combined Promise and Reference; resolves when write is complete, but can be used immediately as the Reference to the child location.

这意味着您可以将其用作将来对书面数据的参考.

It means you can use it as a future reference to the written data.

另请参见代码库. ThenableReference Def 在这里.

See also in codebase. ThenableReference Def here.

 export interface ThenableReference extends Reference, PromiseLike<Reference> {}

或者您可以采用推荐的方式,即: 您目前无法使用catch.

Or you can do the recommended way i.e: You cannot use catch currently.

 this.afd.list(this.firestore).push({ uid: firebase.auth().currentUser.uid, devtoken: t });

注意:此处有一个未解决的问题

跟随它.

Note: There is an open issue here if you want to follow it.