Skip to content

Commit

Permalink
fix(afs): fix regression keeping one from overriding collection.doc t…
Browse files Browse the repository at this point in the history
…ype (#2668)
  • Loading branch information
jamesdaniels committed Nov 19, 2020
1 parent 7f89643 commit 22e2883
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/firestore/collection/collection.ts
Expand Up @@ -141,7 +141,8 @@ export class AngularFirestoreCollection<T = DocumentData> {
/**
* Create a reference to a single document in a collection.
*/
doc(path?: string): AngularFirestoreDocument<T> {
return new AngularFirestoreDocument<T>(this.ref.doc(path), this.afs);
doc<T2 = T>(path?: string): AngularFirestoreDocument<T2> {
// TODO is there a better way to solve this type issue
return new AngularFirestoreDocument(this.ref.doc(path) as any, this.afs);
}
}

0 comments on commit 22e2883

Please sign in to comment.