You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Specify the return document type for AngularFirestoreDocument.get() #2361
The return type of the AngularFirestoreDocument.get() is not set, this will cause the editor cant perform autocomplete when calling DocumentSnapshot.data() because it will just treat its return type, as firestore.DocumentData instead the real type.
Version info
Angular: 9.0.7
Firebase: 7.11.0
AngularFire: 5.4.2
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Node: v12.6
npm: 6.14.2
Browser: Latest chrome and firefox nightly.
How to reproduce these conditions
exportclassSample{constructor(privateafStoreAngularFirestore){}test(path: string){this.afStore.doc<SampleType>(path).get().pipe(take(1)).subscribe(doc=>{console.log(doc.data());// The real type of doc.data() is not infered by the editor.})}}
Activity
KingDarBoja commentedon Jun 30, 2020
The return type should be indeed a generic as the other methods inside the
AngularFirestoreDocumentclass definition.jamesdaniels commentedon Nov 12, 2020
Should be addressed in
6.1.0-rc.1