Skip to content

Commit

Permalink
feat(afs): Inherit doc return type from class (#2640)
Browse files Browse the repository at this point in the history
  • Loading branch information
P1X3 authored Nov 11, 2020
1 parent 21cf7c2 commit f7bbd09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/firestore/collection/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class AngularFirestoreCollection<T= DocumentData> {
/**
* Create a reference to a single document in a collection.
*/
doc<T>(path?: string): AngularFirestoreDocument<T> {
return new AngularFirestoreDocument<T>(this.ref.doc(path), this.afs);
doc<T2 = T>(path?: string): AngularFirestoreDocument<T2> {
return new AngularFirestoreDocument<T2>(this.ref.doc(path), this.afs);
}
}

0 comments on commit f7bbd09

Please sign in to comment.