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
It might be better if I just roll my own dedicated CancelToken class to hold all the methods, and make this have something like this instead (basic implementation sketch):
// This holds all the real stateclassCancelController{constructor(init){ ... }getisCanceled(){ ... }gettoken(){ ... }// memoizedcancel(){ ... }cancelAsync(){ ... }}// Proxy for the controller, to provide privacy. Not directly exposed.classCancelToken{constructor(ctrl){ ... }getisCanceled(){ ... }getpromise(){ ... }// memoizedthrowIfCanceled(){ ... }addCancel(func){ ... }removeCancel(func){ ... }}
For compatibility, aborted and onabort should also be accepted in the API, in case someone uses a weird Abort{Signal,Controller} polyfill for some reason (and in case this gets ported to the browser, where that could legitimately happen).
Things it needs:
The text was updated successfully, but these errors were encountered: