firestore-auto-sync
Version:
<a href="https://www.npmjs.com/package/firestore-auto-sync"><img src="https://img.shields.io/npm/v/firestore-auto-sync.svg" alt="Total Downloads"></a> <a href="https://www.npmjs.com/package/firestore-auto-sync"><img src="https://img.shields.io/npm/dw/fire
15 lines (14 loc) • 611 B
TypeScript
import { DocumentReference } from "firebase-admin/firestore";
import { UpdateFoundDocs, UpdateSpecificDoc } from "src";
/**
* Returns the refs to be used to update/increment/...
*/
export declare function getUpdatePath(newOrOldData: Record<string, any>, update: (UpdateFoundDocs<any> | UpdateSpecificDoc) & ({
propToUpdate: string;
} | {
propToIncrement: string;
})): string;
/**
* Returns the refs to be used to update/increment/...
*/
export declare function updateInfoToRefs(newOrOldData: Record<string, any>, update: UpdateFoundDocs<any> | UpdateSpecificDoc): Promise<DocumentReference<any>[]>;