@@ -87,9 +87,7 @@ export function isAjaxError(error: any): error is AjaxError {
87
87
* Checks if the given status code or AjaxError object represents an
88
88
* unauthorized request error
89
89
*/
90
- export function isUnauthorizedError (
91
- error : UnauthorizedError | number
92
- ) : boolean {
90
+ export function isUnauthorizedError ( error : AjaxError | number ) : boolean {
93
91
if ( isAjaxError ( error ) ) {
94
92
return error instanceof UnauthorizedError ;
95
93
} else {
@@ -101,7 +99,7 @@ export function isUnauthorizedError(
101
99
* Checks if the given status code or AjaxError object represents a forbidden
102
100
* request error
103
101
*/
104
- export function isForbiddenError ( error : ForbiddenError | number ) : boolean {
102
+ export function isForbiddenError ( error : AjaxError | number ) : boolean {
105
103
if ( isAjaxError ( error ) ) {
106
104
return error instanceof ForbiddenError ;
107
105
} else {
@@ -113,7 +111,7 @@ export function isForbiddenError(error: ForbiddenError | number): boolean {
113
111
* Checks if the given status code or AjaxError object represents an invalid
114
112
* request error
115
113
*/
116
- export function isInvalidError ( error : InvalidError | number ) : boolean {
114
+ export function isInvalidError ( error : AjaxError | number ) : boolean {
117
115
if ( isAjaxError ( error ) ) {
118
116
return error instanceof InvalidError ;
119
117
} else {
@@ -125,7 +123,7 @@ export function isInvalidError(error: InvalidError | number): boolean {
125
123
* Checks if the given status code or AjaxError object represents a bad request
126
124
* error
127
125
*/
128
- export function isBadRequestError ( error : BadRequestError | number ) : boolean {
126
+ export function isBadRequestError ( error : AjaxError | number ) : boolean {
129
127
if ( isAjaxError ( error ) ) {
130
128
return error instanceof BadRequestError ;
131
129
} else {
@@ -137,7 +135,7 @@ export function isBadRequestError(error: BadRequestError | number): boolean {
137
135
* Checks if the given status code or AjaxError object represents a "not found"
138
136
* error
139
137
*/
140
- export function isNotFoundError ( error : NotFoundError | number ) : boolean {
138
+ export function isNotFoundError ( error : AjaxError | number ) : boolean {
141
139
if ( isAjaxError ( error ) ) {
142
140
return error instanceof NotFoundError ;
143
141
} else {
@@ -149,7 +147,7 @@ export function isNotFoundError(error: NotFoundError | number): boolean {
149
147
* Checks if the given status code or AjaxError object represents a "gone"
150
148
* error
151
149
*/
152
- export function isGoneError ( error : GoneError | number ) : boolean {
150
+ export function isGoneError ( error : AjaxError | number ) : boolean {
153
151
if ( isAjaxError ( error ) ) {
154
152
return error instanceof GoneError ;
155
153
} else {
@@ -168,7 +166,7 @@ export function isTimeoutError(error: any) {
168
166
* Checks if the given status code or AjaxError object represents an
169
167
* "abort" error
170
168
*/
171
- export function isAbortError ( error : AbortError | number ) : boolean {
169
+ export function isAbortError ( error : AjaxError | number ) : boolean {
172
170
if ( isAjaxError ( error ) ) {
173
171
return error instanceof AbortError ;
174
172
} else {
@@ -180,7 +178,7 @@ export function isAbortError(error: AbortError | number): boolean {
180
178
* Checks if the given status code or AjaxError object represents a
181
179
* conflict error
182
180
*/
183
- export function isConflictError ( error : ConflictError | number ) : boolean {
181
+ export function isConflictError ( error : AjaxError | number ) : boolean {
184
182
if ( isAjaxError ( error ) ) {
185
183
return error instanceof ConflictError ;
186
184
} else {
@@ -191,7 +189,7 @@ export function isConflictError(error: ConflictError | number): boolean {
191
189
/**
192
190
* Checks if the given status code or AjaxError object represents a server error
193
191
*/
194
- export function isServerError ( error : ServerError | number ) : boolean {
192
+ export function isServerError ( error : AjaxError | number ) : boolean {
195
193
if ( isAjaxError ( error ) ) {
196
194
return error instanceof ServerError ;
197
195
} else {
0 commit comments