File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ export interface Cancel {
210
210
}
211
211
212
212
export interface Canceler {
213
- ( message ?: string ) : void ;
213
+ ( message ?: string , config ?: AxiosRequestConfig , request ?: any ) : void ;
214
214
}
215
215
216
216
export interface CancelTokenStatic {
Original file line number Diff line number Diff line change @@ -49,13 +49,13 @@ function CancelToken(executor) {
49
49
return promise ;
50
50
} ;
51
51
52
- executor ( function cancel ( message ) {
52
+ executor ( function cancel ( message , config , request ) {
53
53
if ( token . reason ) {
54
54
// Cancellation has already been requested
55
55
return ;
56
56
}
57
57
58
- token . reason = new CanceledError ( message ) ;
58
+ token . reason = new CanceledError ( message , config , request ) ;
59
59
resolvePromise ( token . reason ) ;
60
60
} ) ;
61
61
}
You can’t perform that action at this time.
0 commit comments