- Added
isTimeoutErrorfunction to determine whether the given error is a timeout error #80 - Added
Provision APIthat injects theAbortercontext into theHttp API#81
- Added
onInitinitialization handler forAborter#76 - Added new events
fulfilledandrejectedforEventListener#75
- Added the
abortSignalAnyutility function #60 - Added integration functionality with the
@saborter/serverpackage #60 - Improved JSdoc documentation for
Aborter#60
- Fixed a bug in the
debounceandsetTimeoutAsyncutilities with overriding theinitiatorfield in theAbortErrorerror #60
- Added break promises without signal #56
- Fixed argument injection in
setTimeoutAsyncanddebouncefunctions #54
- Removed the
isErrorstatic method from theAborterclass. - Removed the static field
errorNamefrom theAborterclass. - The
codeandsignalfields have been removed fromAbortError. - Moved the
disposemethod of theAborterinstance into a separate function. - Changed the
isAbortedfield toabortedin theAborterclass.
- Added a
ReusableAborter. #45 - Added the ability to automatically unpack data from
fetch(). - Added
metadatafield forAbortErrorandTimeoutError. #45 - Added utility functions: #43
isAbortError- a type guard function that determines whether a given error is anAbortError.debounce- creates a debounced function that delays invoking the provided handler until after a specified timeout has elapsed since the last call.catchAbortError- this function catches errors that areAbortError's and ignores them, while re‑throwing any other error.isAbortSignal- a type guard that checks whether a given value is an instance ofAbortSignal.rethrowAbortSignal- this function is the complement ofcatchAbortError. It re‑throws the error only if it is anAbortError; otherwise, it does nothing.setTimeoutAsync- schedules the execution of a handler after a specified delay.throwIfAborted- a utility that checks whether anAbortSignalhas been aborted. If the signal is aborted, it throws anAbortError.timeInMilliseconds- converts a configuration object containing time components (hours, minutes, seconds, milliseconds) into a total number of milliseconds.dispose- a function that allows you to clear an object's data, if the object supports this feature.setLoggerMode- sets the globalSaborterlogging mode for the application.setDebugErrorStackMode- changes the error stack mode, enabling or disabling debug information.
- Fixes a bug in the
Aborter.isErrorfunction where any argument passed returnedtrue#41
- Adds a one-time execution option (
once) toEventListener#32 - Adds an extended stack for the
AbortErrorerror #33 - Adds a
reasonoption toTimeoutError#34 - Adds the
isAbortedflag toAborter#37
- Fixes a bug where the request state would not change to
cancelled#35
- Aborting a request is
rejected, and cancellations of previous requests are ignored. #31 TimeoutErroris now always accepted as a catch. #31
- Fixes a bug where the
catchblock would receive a regular error, rather than the customAbortErrorerror. #29 - Fixes a typing error where IntelliSense does not suggest options for the
AbortErrorerror. #29 - The documentation has been corrected: #29
RequestState APInow provides a little more information about therejectedstate.- The
initiatorfield for theAbortErrorerror is now alwaysError.
Timeout API- Ability to create automatic cancellation of a request.TimeoutErrorclass - Error for working with timeout interrupt.
RequestState API- The ability to find out what status the request is currently in.cause|initiatorproperty - New properties ofAbortError.dispose()method - Clears the object's data completely: all subscriptions in all properties, clears overridden methods, state values.
- Fixes a bug where the first event would start with a cancellation, even if there was nothing to cancel #23
AbortErrorclass - A class for representing interruption errors. Extends the built-inErrorclass and adds interrupt-specific properties.abortWithRecovery()method - Immediately cancels the currently executing request and then restores theAbortSignalto its working state.listenersproperty - Returns anEventListenerobject to listen forAborterevents.
- Aborter class - main class for managing request cancellation
try()method - executes asynchronous requests with automatic cancellation of previous onesabort()method - manual cancellation of current requestsignalproperty - access toAbortSignalof current controller- Static
isError()method - checks if error is anAbortError - Static
errorNameproperty - instance error nameAbortError