Skip to content

Inherit doc return type from class#2640

Merged
jamesdaniels merged 2 commits intoangular:masterfrom
P1X3:doc-return-type-fix
Nov 11, 2020
Merged

Inherit doc return type from class#2640
jamesdaniels merged 2 commits intoangular:masterfrom
P1X3:doc-return-type-fix

Conversation

@P1X3
Copy link
Contributor

@P1X3 P1X3 commented Nov 9, 2020

Checklist

Description

Updated doc function generic return type to inherit type from class generic

Code sample

Without this change defining type on collection function call does not pass it to doc function call:
db.collection<Location>('locations').doc('someid').valueChanges(); // Returns Observable<unknown>
db.collection<Location>('locations').doc<Location>('someid').valueChanges(); // Returns Observable<Location>

With this PR calling collection function with type will pass it to doc function call.
db.collection<Location>('locations').doc('someid').valueChanges(); // Returns Observable<Location>
db.collection<Location>('locations').doc<Location>('someid').valueChanges(); // Returns Observable<Location>

@P1X3
Copy link
Contributor Author

P1X3 commented Nov 9, 2020

Browsing deeper into other PR I noticed that this PR will will conflict with #2573

@jamesdaniels
Copy link
Member

Thanks, appreciate this. Aiming to start prepping for the 6.1 release shortly and will take a look at these PRs.

@jamesdaniels jamesdaniels added this to the 6.1 milestone Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants