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
which starts to defeat the purpose. Especially since non-Throwables can be thrown in Dart. So, would we actually wind up with a return type of Future<Anything>?
Edit: not sure why I had Throwable in the union. Need to test this. It might be:
An argument not to do this is in increases the likelihood of mistakenly winding up with a nested Future<Future<T>> result, which will actually be Future<T> since Dart unwraps Futures returned by onValue.
And, type inference seems to prefer the nested option for S|Future<S> (i.e. it ignores the Future<S> part of the union, so the inferred type is not unwrapped).
Future.then
(docs) is defined as:which results in the return type
Future<Nothing>
in Ceylon. Instead, we should consider hard-coding the model to have something like:although, it may need to be more complicated, like:
which starts to defeat the purpose. Especially since non-
Throwable
s can be thrown in Dart. So, would we actually wind up with a return type ofFuture<Anything>
?Edit: not sure why I had
Throwable
in the union. Need to test this. It might be:The text was updated successfully, but these errors were encountered: