CancelSource Interface
Package: @esfx/canceltoken
Signals a CancelToken when cancellation has been requested.
Declaration
export interface CancelSource extends CancelableSource, Disposable
Inherited Members
Properties
token
Gets the CancelToken linked to this source.
Declaration
readonly token: CancelToken;
Property Value
Methods
cancel(reason)
Cancels the source, evaluating any subscribed callbacks. If any callback raises an exception, the exception is propagated to a host specific unhandled exception mechanism.
Declaration
cancel(reason?: unknown): void;
Parameters
- reason
- unknown
Returns
void
close()
Closes the source, preventing the possibility of future cancellation.
Declaration
close(): void;
Returns
void