Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Support for Generics for responses? #28

Closed
kylecannon opened this issue May 10, 2018 · 6 comments
Closed

Support for Generics for responses? #28

kylecannon opened this issue May 10, 2018 · 6 comments
Assignees
Labels

Comments

@kylecannon
Copy link

Hi, is there any plans for supporting generics for responses?

@akanass
Copy link
Owner

akanass commented May 10, 2018

Hy what do you mean?

@akanass akanass self-assigned this May 10, 2018
@kylecannon
Copy link
Author

Right now when you do a request EX: request.get('/foo').pipe(map(r => r.body)), body is of type any. If we were able to add generics for the get request EX: request.get<MyFooInterface>('/foo')

See how angular does it with their http library: https://angular.io/guide/http#making-a-post-request

@kylecannon
Copy link
Author

By the way, forgot to say thank you for the awesome library 👍

@akanass
Copy link
Owner

akanass commented May 10, 2018

I understood I can add it with the migration on RxJS V6

@kylecannon
Copy link
Author

That would be fantastic. Thank you very much. This would greatly increase the workarounds I am doing right now for typings.

@akanass
Copy link
Owner

akanass commented May 28, 2018

v3.0.0 published with generics and rxjs v6+

@akanass akanass closed this as completed May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants