You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I have noticed a problem with Generic Methods, not properly inferring their types, when they are used as a value, instead of as a method. I'm not sure if it's a known issue or not.
It's easy enough to work around by using a function, but I'd prefer to just hand in the method, since it's already a method that can be called.
This case is in Rx, but I've seen other examples of it too.
varobservableOfAny=Observable.from(items).flatMap(Observable.from);// using as a variable doesn't workvarobservableOfString=Observable.from(items).flatMap(x=>Observable.from(x));// Using a delegate worksvarfromString: (arr: string[])=>Observable<string>=Observable.from;varobservableOfString=Observable.from(items).flatMap(fromString);// Properly casting the method works
I've got an example, again using rx interfaces (so maybe something is wrong with them? it's possible). playground example
The text was updated successfully, but these errors were encountered:
I think I have noticed a problem with Generic Methods, not properly inferring their types, when they are used as a value, instead of as a method. I'm not sure if it's a known issue or not.
It's easy enough to work around by using a function, but I'd prefer to just hand in the method, since it's already a method that can be called.
This case is in Rx, but I've seen other examples of it too.
I've got an example, again using rx interfaces (so maybe something is wrong with them? it's possible). playground example
The text was updated successfully, but these errors were encountered: