I ran into this code mistake I made recently, and I think it would be nice if the API could help catch this issue.
Steps to reproduce:
Try writing to a document directly while in a transaction.
await db.runTransaction(async t => {
const docRef = db.collection('cities').doc('Toronto');
await docRef.set(...);
});
While of course, this is a code issue caused by the programmer, it is particularly frustrating to debug as it seems to cause a deadlock/unfulfilled promise. Possibly the API could help catch this issue by marking the stack and throwing an error (maybe only in dev?).