I meet this code and do not understand exactly what it does :
public uploadItem(value:FileItem):void {
let index = this.getIndexOfItem(value);
let item = this.queue[index];
let transport = this.options.isHTML5 ? '_xhrTransport' : '_iframeTransport';
item._prepareToUploading();
if (this.isUploading) {
return;
}
this.isUploading = true;
(this as any)[transport](item);
}
Can anyone explain what does this (this as any) statement do?
this as any
is a cast. It casts thethis
to theany
type (which also removes most compile time type checks) – Shoemake