(documentRef: any, field: any, value?: any, moreFieldsAndValues?: any)
| 1340 | update<T extends DocumentData = DocumentData>(documentRef: DocumentReference<T>, data: Partial<{ [K in keyof T]: T[K] | FieldValue }>): WriteBatch; |
| 1341 | update<T extends DocumentData = DocumentData, K extends keyof T = string>(documentRef: DocumentReference<T>, field: K | FieldPath, value: FieldValue | T[K], moreFieldAndValues: any[]): WriteBatch; |
| 1342 | update<T extends DocumentData = DocumentData>(documentRef: any, field: any, value?: any, moreFieldsAndValues?: any): WriteBatch { |
| 1343 | let batch; |
| 1344 | |
| 1345 | if (arguments.length === 2) { |
| 1346 | batch = this.native.update(documentRef.native, serializeItems(field)); |
| 1347 | } else { |
| 1348 | if (field instanceof FieldPath) { |
| 1349 | batch = this.native.update(documentRef.native, field.native, value?.native || value || null, moreFieldsAndValues?.map((value) => value?.native || value) ?? []); |
| 1350 | } else { |
| 1351 | batch = this.native.update(documentRef.native, field.native, value?.native || value || null, moreFieldsAndValues?.map((value) => value?.native || value) ?? []); |
| 1352 | } |
| 1353 | } |
| 1354 | |
| 1355 | return WriteBatch.fromNative(batch); |
| 1356 | } |
| 1357 | } |
| 1358 | |
| 1359 | export class Settings implements ISettings { |
nothing calls this directly
no test coverage detected