firesage
Version:
🔥 Extremely High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience
20 lines (15 loc) • 846 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.setDoc = void 0;
var firestore_1 = require("firebase/firestore");
var fieldValue_1 = require("../fieldValue");
/**
Writes to the document referred to by this DocumentReference. If the document does not yet exist, it will be created.
@param reference — A reference to the document to write.
@param data — A map of the fields and values for the document.
@param options - An object to configure the set behavior.
@returns A Promise resolved once the data has been successfully written to the backend (note that it won't resolve while you're offline).
*/
exports.setDoc = (function (reference, data, options) {
return (0, firestore_1.setDoc)(reference, (0, fieldValue_1.removeFieldValueInhomogeneousProps)(data), options || {});
});