📜  Firestore 增量字段 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:25.739000             🧑  作者: Mango

代码示例2
const userRef = db.collection('documents').doc('document_id');
const decrement = firebase.firestore.FieldValue.increment(-1);

userRef.update({ fieldToDecrease: decrement });