Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit doc return type from class #2640

Merged
merged 2 commits into from
Nov 11, 2020
Merged

Inherit doc return type from class #2640

merged 2 commits into from
Nov 11, 2020

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