我在我的reactjs+typescript 项目中使用firebase。我想在 firebase 中编写一个文档,并且我正在使用它setDoc来完成这项工作。
import { doc, setDoc } from 'firebase/firestore';
setDoc(doc(database, `path`), objData)
Run Code Online (Sandbox Code Playgroud)
当您检查函数返回时,它会显示Promise<...>. then() catch()但是,如果我不知道承诺在履行/拒绝时返回什么,我该如何使用承诺处理程序?