MCPcopy Create free account
hub / github.com/NativeScript/firebase / get

Method get

packages/firebase-firestore/index.android.ts:232–241  ·  view source on GitHub ↗
(documentRef: DocumentReference<T>)

Source from the content-addressed store, hash-verified

230 }
231
232 get<T extends DocumentData = DocumentData>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>> {
233 // TODO check error returned
234 return new Promise((resolve, reject) => {
235 try {
236 resolve(DocumentSnapshot.fromNative(this._native.get(documentRef.native)));
237 } catch (e) {
238 reject(e);
239 }
240 });
241 }
242
243 update<T extends DocumentData = DocumentData>(documentRef: DocumentReference<T>, data: Partial<{ [K in keyof T]: T[K] | FieldValue }>): Transaction;
244 update<T extends DocumentData = DocumentData, K extends keyof T = string>(documentRef: DocumentReference<T>, field: K | FieldPath, value: T[K], moreFieldsAndValues: any[]): Transaction;

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
fromNativeMethod · 0.45

Tested by

no test coverage detected