Skip to content

Commit f7bbd09

Browse files
authored
feat(afs): Inherit doc return type from class (#2640)
1 parent 21cf7c2 commit f7bbd09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/firestore/collection/collection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class AngularFirestoreCollection<T= DocumentData> {
141141
/**
142142
* Create a reference to a single document in a collection.
143143
*/
144-
doc<T>(path?: string): AngularFirestoreDocument<T> {
145-
return new AngularFirestoreDocument<T>(this.ref.doc(path), this.afs);
144+
doc<T2 = T>(path?: string): AngularFirestoreDocument<T2> {
145+
return new AngularFirestoreDocument<T2>(this.ref.doc(path), this.afs);
146146
}
147147
}

0 commit comments

Comments
 (0)