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
The promise will resolve when the observable completes - resolving with the last emitted value or with undefined if a value wasn't emitted.
However, the type declarations cannot express whether or not an observable will emit a value at runtime, so it could be argued that the type for the promise should always be Promise<T | undefined>.
That would more correctly describe the behaviour, but it would be a breaking change.
Bug Report
Current Behavior
toPromise has the wrong type
Reproduction
Expected behavior
p will in fact resolve to undefined and should have the type Promise<string | undefined>
The text was updated successfully, but these errors were encountered: