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
Type 'DocumentData[]' is not assignable to type '{ username: string; }[]'.
Property 'username' is missing in type 'DocumentData' but required in type '{ username: string; }'.
Expected behavior
The QueryDocumentSnapshot's data() functions return value should be of the type '{ username: string; }'
Actual behavior
Its return value is of the type DocumentData
The text was updated successfully, but these errors were encountered:
Version info
Angular: 8.2.14
Firebase: 7.14.2
AngularFire: 5.4.2
Ionic: 5.0.7
Capacitor: 2.0.1
How to reproduce these conditions
let users: Array<{ username: string }>
this.fireStore.collection<{ username: string }>('users').get().subscribe(querySnapshot => {
users = querySnapshot.docs.map(doc => doc.data())
})
Debug output
Type 'DocumentData[]' is not assignable to type '{ username: string; }[]'.
Property 'username' is missing in type 'DocumentData' but required in type '{ username: string; }'.
Expected behavior
The QueryDocumentSnapshot's data() functions return value should be of the type '{ username: string; }'
Actual behavior
Its return value is of the type DocumentData
The text was updated successfully, but these errors were encountered: