Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Suggestion: make let return any #1498

Open
staeke opened this issue Jul 10, 2017 · 0 comments
Open

Suggestion: make let return any #1498

staeke opened this issue Jul 10, 2017 · 0 comments

Comments

@staeke
Copy link

staeke commented Jul 10, 2017

Suggestion: change let signature (same implementation) from

function letProto<T, R>(this: Observable<T>, func: (selector: Observable<T>) => Observable<R>): Observable<R> ;

to

function letProto<T, R>(this: Observable<T>, func: (selector: Observable<T>) => R): R;

It seems to me that returning an Observable is an unnecessary constraint. Generalizing let would make it usable for returning other custom types taking observables as parameters and doing whatever with them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant