We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fromPromise
rxjs/src/internal/observable/from.ts
Lines 191 to 205 in 0d78d21
I saw the soure code of fromPromise to Observable, Why not support promise cancelable?
Observable
function fromPromise<T>(promise: PromiseLike<T>) { return new Observable((subscriber: Subscriber<T>) => { promise .then( (value) => { if (!subscriber.closed) { subscriber.next(value); subscriber.complete(); } }, (err: any) => subscriber.error(err) ) .then(null, reportUnhandledError); }); return () => { // See https://github.com/sindresorhus/p-cancelable/blob/master/index.js if (promise && typeof promise.cacel === 'function') { if (!promise.isCanceled) { promise.cacel(); } } }; }
The text was updated successfully, but these errors were encountered:
There is discussion around to support spec-compliant abort signal (#5863). Rxjs don't support non-spec compliant cancel from 3rd party libraries.
Sorry, something went wrong.
No branches or pull requests
rxjs/src/internal/observable/from.ts
Lines 191 to 205 in 0d78d21
I saw the soure code of
fromPromise
toObservable
, Why not support promise cancelable?The text was updated successfully, but these errors were encountered: