I'm using firebase in my reactjs+typescript project. I want to write a document in firebase and I'm using setDoc to do this job.
import { doc, setDoc } from 'firebase/firestore';
setDoc(doc(database, `path`), objData)
When you check the function return it says Promise<...>. But, how am I supposed to use then() catch() promise handlers if I don't know what the promise returns when it fullfil/reject?