File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -87,18 +87,18 @@ export default class dummyXMLHttpRequest {
8787 }
8888
8989 if ( typeof xhr . onload === 'function' ) {
90- xhr . onload ( this . event ( 'load' ) ) ;
90+ xhr . onload ( this . event ( 'load' ) as ProgressEvent < EventTarget > ) ;
9191 } else if ( isEventReady ) {
9292 xhr . dispatchEvent ( new Event ( 'load' ) ) ;
9393 }
9494 if ( typeof xhr . onloadend === 'function' ) {
95- xhr . onloadend ( this . event ( 'loadend' ) ) ;
95+ xhr . onloadend ( this . event ( 'loadend' ) as ProgressEvent < EventTarget > ) ;
9696 } else if ( isEventReady ) {
9797 xhr . dispatchEvent ( new Event ( 'loadend' ) ) ;
9898 }
9999 }
100100
101- private event ( type : string ) {
101+ private event ( type : string ) : Event {
102102 return {
103103 type,
104104 target : this ,
@@ -126,7 +126,7 @@ export default class dummyXMLHttpRequest {
126126 lengthComputable : false ,
127127 loaded : 1 ,
128128 total : 1
129- } ;
129+ } as unknown as Event ;
130130 }
131131
132132 getAllResponseHeaders ( ) {
You can’t perform that action at this time.
0 commit comments