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

Method issue_51

apps/demo/src/plugin-demos/firebase-firestore.ts:22–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 issue_51() {
23 const doc = firebase().firestore().collection('users').doc('0Myq8dlF1dQtC7tX4WlA');
24
25 const users = firebase().firestore().collection('users');
26
27 doc.onSnapshot({
28 next(snapshot) {
29 console.log('onSnapshot', 'object');
30 },
31 });
32
33 doc.onSnapshot(
34 { includeMetadataChanges: true },
35 {
36 next(snapshot) {
37 console.log('onSnapshot', 'options', '&', 'object');
38 },
39 }
40 );
41
42 doc.onSnapshot((doc) => {
43 console.log('onSnapshot', '&', 'function');
44 });
45
46 doc.onSnapshot({ includeMetadataChanges: true }, (doc) => {
47 console.log('onSnapshot', 'options', '&', 'function');
48 });
49
50 users.onSnapshot({
51 next(snapshot) {
52 console.log('users', 'onSnapshot', 'object');
53 },
54 });
55
56 users.onSnapshot(
57 { includeMetadataChanges: true },
58 {
59 next(snapshot) {
60 console.log('users', 'onSnapshot', 'options', '&', 'object');
61 },
62 }
63 );
64
65 users.onSnapshot((doc) => {
66 console.log('users', 'onSnapshot', '&', 'function');
67 });
68
69 users.onSnapshot({ includeMetadataChanges: true }, (doc) => {
70 console.log('users', 'onSnapshot', 'options', '&', 'function');
71 });
72 }
73
74 async init() {
75 firebase()

Callers 1

testItMethod · 0.95

Calls 6

firebaseFunction · 0.90
docMethod · 0.65
collectionMethod · 0.65
firestoreMethod · 0.65
onSnapshotMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected