firesage
Version:
🔥 Extremely High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience
23 lines (20 loc) • 990 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayRemove = void 0;
var firestore_1 = require("firebase/firestore");
/**
Returns a special value that can be used with (setDoc:1) or * updateDoc:1 that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array.
@param elements — The elements to remove from the array.
@returns
The FieldValue sentinel for use in a call to setDoc() or updateDoc()
*/
var arrayRemove = function () {
var elements = [];
for (var _i = 0; _i < arguments.length; _i++) {
elements[_i] = arguments[_i];
}
var ref = firestore_1.arrayRemove.apply(void 0, elements);
ref['Firelord.ArrayFieldValue'] = elements;
return ref;
};
exports.arrayRemove = arrayRemove;