@@ -56,7 +56,7 @@ export interface AjaxErrorCtor {
5656 */
5757export const AjaxError : AjaxErrorCtor = createErrorClass (
5858 ( _super ) =>
59- function AjaxError ( this : any , message : string , xhr : XMLHttpRequest , request : AjaxRequest ) {
59+ function AjaxErrorImpl ( this : any , message : string , xhr : XMLHttpRequest , request : AjaxRequest ) {
6060 this . message = message ;
6161 this . name = 'AjaxError' ;
6262 this . xhr = xhr ;
@@ -85,16 +85,6 @@ export interface AjaxTimeoutErrorCtor {
8585 new ( xhr : XMLHttpRequest , request : AjaxRequest ) : AjaxTimeoutError ;
8686}
8787
88- const AjaxTimeoutErrorImpl = ( ( ) => {
89- function AjaxTimeoutErrorImpl ( this : any , xhr : XMLHttpRequest , request : AjaxRequest ) {
90- AjaxError . call ( this , 'ajax timeout' , xhr , request ) ;
91- this . name = 'AjaxTimeoutError' ;
92- return this ;
93- }
94- AjaxTimeoutErrorImpl . prototype = Object . create ( AjaxError . prototype ) ;
95- return AjaxTimeoutErrorImpl ;
96- } ) ( ) ;
97-
9888/**
9989 * Thrown when an AJAX request timesout. Not to be confused with {@link TimeoutError}.
10090 *
@@ -105,4 +95,12 @@ const AjaxTimeoutErrorImpl = (() => {
10595 * @class AjaxTimeoutError
10696 * @see ajax
10797 */
108- export const AjaxTimeoutError : AjaxTimeoutErrorCtor = AjaxTimeoutErrorImpl as any ;
98+ export const AjaxTimeoutError : AjaxTimeoutErrorCtor = ( ( ) => {
99+ function AjaxTimeoutErrorImpl ( this : any , xhr : XMLHttpRequest , request : AjaxRequest ) {
100+ AjaxError . call ( this , 'ajax timeout' , xhr , request ) ;
101+ this . name = 'AjaxTimeoutError' ;
102+ return this ;
103+ }
104+ AjaxTimeoutErrorImpl . prototype = Object . create ( AjaxError . prototype ) ;
105+ return AjaxTimeoutErrorImpl ;
106+ } ) ( ) as any ;
0 commit comments