letdocumentRef=firestore.doc('col/doc');documentRef.set({foo:'bar'}).then(writeResult=>{console.log(`Document written at:${writeResult.writeTime.toDate()}`);});
Methods
isEqual(other)
isEqual(other:firestore.WriteResult):boolean;
Returns true if thisWriteResultis equal to the provided value.
Parameter
Name
Description
other
firestore.WriteResult
The value to compare against. true if thisWriteResultis equal to the provided value.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class WriteResult (7.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [7.11.0 (latest)](/nodejs/docs/reference/firestore/latest/firestore/writeresult)\n- [7.9.0](/nodejs/docs/reference/firestore/7.9.0/firestore/writeresult)\n- [7.7.0](/nodejs/docs/reference/firestore/7.7.0/firestore/writeresult)\n- [7.6.0](/nodejs/docs/reference/firestore/7.6.0/firestore/writeresult)\n- [7.5.0](/nodejs/docs/reference/firestore/7.5.0/firestore/writeresult)\n- [7.4.0](/nodejs/docs/reference/firestore/7.4.0/firestore/writeresult)\n- [7.3.1](/nodejs/docs/reference/firestore/7.3.1/firestore/writeresult)\n- [7.2.0](/nodejs/docs/reference/firestore/7.2.0/firestore/writeresult)\n- [7.1.0](/nodejs/docs/reference/firestore/7.1.0/firestore/writeresult)\n- [6.4.1](/nodejs/docs/reference/firestore/6.4.1/firestore/writeresult)\n- [6.3.0](/nodejs/docs/reference/firestore/6.3.0/firestore/writeresult)\n- [6.0.0](/nodejs/docs/reference/firestore/6.0.0/firestore/writeresult)\n- [5.0.2](/nodejs/docs/reference/firestore/5.0.2/firestore/writeresult)\n- [4.15.1](/nodejs/docs/reference/firestore/4.15.1/firestore/writeresult)\n- [4.14.2](/nodejs/docs/reference/firestore/4.14.2/firestore/writeresult)\n- [4.9.8](/nodejs/docs/reference/firestore/4.9.8/firestore/writeresult) \nA WriteResult wraps the write time set by the Firestore servers on sets(), updates(), and creates().\n\nWriteResult\n\nPackage\n-------\n\n[@google-cloud/firestore](../overview.html)\n\nConstructors\n------------\n\n### (constructor)(_writeTime)\n\n constructor(_writeTime: Timestamp);\n\nConstructs a new instance of the `WriteResult` class\n\nProperties\n----------\n\n### writeTime\n\n get writeTime(): Timestamp;\n\nThe write time as set by the Firestore servers.\n\n{Timestamp} WriteResult#writeTime\n**Example** \n\n\n let documentRef = firestore.doc('col/doc');\n\n documentRef.set({foo: 'bar'}).then(writeResult =\u003e {\n console.log(`Document written at: ${writeResult.writeTime.toDate()}`);\n });\n\nMethods\n-------\n\n### isEqual(other)\n\n isEqual(other: firestore.WriteResult): boolean;\n\nReturns true if this `WriteResult` is equal to the provided value."]]